Author: PaulM Date: 2011-09-21 23:37:50 -0700 (Wed, 21 Sep 2011) New Revision: 16883
Modified: django/trunk/django/contrib/databrowse/datastructures.py Log: Fixed #16565 -- Fixed a databrowse error on null foreign key, even though databrowse is deprecated. Thanks aaugustin for the patch. Modified: django/trunk/django/contrib/databrowse/datastructures.py =================================================================== --- django/trunk/django/contrib/databrowse/datastructures.py 2011-09-22 05:56:47 UTC (rev 16882) +++ django/trunk/django/contrib/databrowse/datastructures.py 2011-09-22 06:37:50 UTC (rev 16883) @@ -184,6 +184,8 @@ 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: -- You received this message because you are subscribed to the Google Groups "Django updates" group. To post to this group, send email to django-updates@googlegroups.com. To unsubscribe from this group, send email to django-updates+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-updates?hl=en.