Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Fixed #8544: correctly cast `Comment.object_pk` to string when doing …

…lookups. This really only papers over a bigger problem related to casting the RHS of GFKs, but that larger change can wait for a more systematic fix.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@8641 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 1106c558b1e8d141185f0b3667e374c735c8aaeb 1 parent ff420b4
Jacob Kaplan-Moss authored August 27, 2008
3  django/contrib/comments/templatetags/comments.py
@@ -3,6 +3,7 @@
3 3
 from django.conf import settings
4 4
 from django.contrib.contenttypes.models import ContentType
5 5
 from django.contrib import comments
  6
+from django.utils.encoding import smart_unicode
6 7
 
7 8
 register = template.Library()
8 9
 
@@ -77,7 +78,7 @@ def get_query_set(self, context):
77 78
 
78 79
         qs = self.comment_model.objects.filter(
79 80
             content_type = ctype,
80  
-            object_pk    = object_pk,
  81
+            object_pk    = smart_unicode(object_pk),
81 82
             site__pk     = settings.SITE_ID,
82 83
             is_public    = True,
83 84
         )

0 notes on commit 1106c55

Please sign in to comment.
Something went wrong with that request. Please try again.