Django

Code

Changeset 8641

Show
Ignore:
Timestamp:
08/27/08 17:51:24 (3 months ago)
Author:
jacob
Message:

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.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • django/trunk/django/contrib/comments/templatetags/comments.py

    r8573 r8641  
    44from django.contrib.contenttypes.models import ContentType 
    55from django.contrib import comments 
     6from django.utils.encoding import smart_unicode 
    67 
    78register = template.Library() 
     
    7879        qs = self.comment_model.objects.filter( 
    7980            content_type = ctype, 
    80             object_pk    = object_pk
     81            object_pk    = smart_unicode(object_pk)
    8182            site__pk     = settings.SITE_ID, 
    8283            is_public    = True,