Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Fixed #16565 -- Fixed a databrowse error on null foreign key, even th…

…ough databrowse is deprecated. Thanks aaugustin for the patch.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@16883 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit c59339f450343960ee5dd2e2bb8d1a8507ccdaba 1 parent 0bd0bb7
Paul McMillan authored September 22, 2011
2  django/contrib/databrowse/datastructures.py
@@ -184,6 +184,8 @@ def urls(self):
184 184
             if self.field.rel.to in self.model.model_list:
185 185
                 lst = []
186 186
                 for value in self.values():
  187
+                    if value is None:
  188
+                        continue
187 189
                     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())))
188 190
                     lst.append((smart_unicode(value), url))
189 191
             else:

0 notes on commit c59339f

Please sign in to comment.
Something went wrong with that request. Please try again.