Statistics navigation links are not tied to querysets or model instances,

don't fail when failing to access their _meta field. Fixes GitLab issue #316.
This commit is contained in:
Roberto Rosario
2016-10-20 03:46:49 -04:00
parent 5fedada0f5
commit 8250085703
2 changed files with 18 additions and 1 deletions
+1 -1
View File
@@ -367,7 +367,7 @@ class SourceColumn(object):
# Special case for queryset items produced from
# .defer() or .only() optimizations
return cls._registry[source._meta.parents.items()[0][0]]
except (KeyError, IndexError):
except (AttributeError, KeyError, IndexError):
return ()
except TypeError:
# unhashable type: list