Ticket #16565: django-databrowse-fix-crash-on-null-foreign-keys.patch
File django-databrowse-fix-crash-on-null-foreign-keys.patch, 651 bytes (added by , 13 years ago) |
---|
-
django/contrib/databrowse/datastructures.py
old new 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: