0
0
mirror of https://github.com/django/django.git synced 2024-11-30 07:06:18 +01:00

Fixed #16565 -- Fixed a databrowse error on null foreign key, even though databrowse is deprecated. Thanks aaugustin for the patch.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@16883 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Paul McMillan 2011-09-22 06:37:50 +00:00
parent 0bd0bb7c22
commit c59339f450

View File

@ -184,6 +184,8 @@ class EasyInstanceField(object):
if self.field.rel.to in self.model.model_list:
lst = []
for value in self.values():
if value is None:
continue
url = mark_safe('%s%s/%s/objects/%s/' % (self.model.site.root_url, m.model._meta.app_label, m.model._meta.module_name, iri_to_uri(value._get_pk_val())))
lst.append((smart_unicode(value), url))
else: