Fix navigation object column resolution. Fixes GitLab issue #288.

This commit is contained in:
Roberto Rosario
2016-05-17 01:36:12 -04:00
parent 5959e7362d
commit 3d722325ca
5 changed files with 214 additions and 3 deletions
+3 -1
View File
@@ -364,8 +364,10 @@ class SourceColumn(object):
return cls._registry[source.__class__]
except KeyError:
try:
# Special case for queryset items produced from
# .defer() or .only() optimizations
return cls._registry[source._meta.parents.items()[0][0]]
except IndexError:
except (KeyError, IndexError):
return ()
except TypeError:
# unhashable type: list