Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fixed #1699 -- Fixed JavaScript error in admin site with raw_id_admin…

… and database backend that returns integers as long ints

git-svn-id: http://code.djangoproject.com/svn/django/trunk@2844 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit b301640a1b96cff9a567204abacff3784c343574 1 parent 503a27d
@adrianholovaty adrianholovaty authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  django/contrib/admin/templatetags/admin_list.py
View
2  django/contrib/admin/templatetags/admin_list.py
@@ -167,7 +167,7 @@ def items_for_result(cl, result):
if first: # First column is a special case
first = False
url = cl.url_for_result(result)
- result_id = getattr(result, pk)
+ result_id = str(getattr(result, pk)) # str() is needed in case of 23L (long ints)
yield ('<th%s><a href="%s"%s>%s</a></th>' % \
(row_class, url, (cl.is_popup and ' onclick="opener.dismissRelatedLookupPopup(window, %r); return false;"' % result_id or ''), result_repr))
else:
Please sign in to comment.
Something went wrong with that request. Please try again.