Created
April 18, 2011 18:54
-
-
Save ChristinaMeno/925929 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/medley/extensions/search_indexes.py b/medley/extensions/search_indexes.py | |
index 852edfd..c060df6 100644 | |
--- a/medley/extensions/search_indexes.py | |
+++ b/medley/extensions/search_indexes.py | |
@@ -57,6 +57,7 @@ from ellington.maps.search_indexes import StaticMapIndex | |
from ellington.places.search_indexes import PlaceIndex | |
from ellington.movies.search_indexes import MovieIndex | |
+from django.contrib.contenttypes.models import ContentType | |
from django.contrib.auth.models import User | |
from django.db.models import signals | |
@@ -220,7 +221,7 @@ class MedleyStoryIndex(StoryIndex, UpdatedIndex): | |
def prepare_vote_count(self, obj): | |
from ellington.ratings.models import VotedItem | |
- return VotedItem.objects.filter(content_type=ContentType.objects.filter(model='medleystory'), object_pk=obj.pk).count() | |
+ return VotedItem.objects.filter(content_type=ContentType.objects.filter(model='medleystory'), pk=obj.pk).count() | |
def prepare_url_path(self, obj): | |
return obj.get_absolute_url() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment