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
This commit is contained in:
Adrian Holovaty 2006-05-05 03:24:42 +00:00
parent 503a27d212
commit b301640a1b
1 changed files with 1 additions and 1 deletions

View File

@ -167,7 +167,7 @@ def items_for_result(cl, result):
if first: # First column is a special case if first: # First column is a special case
first = False first = False
url = cl.url_for_result(result) 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>' % \ 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)) (row_class, url, (cl.is_popup and ' onclick="opener.dismissRelatedLookupPopup(window, %r); return false;"' % result_id or ''), result_repr))
else: else: