Also check if a TopLevelMetaclass instance (#261)
This commit is contained in:
parent
b6977a88ea
commit
da7a8939df
1 changed files with 1 additions and 1 deletions
|
|
@ -33,7 +33,7 @@ class DeReference(object):
|
||||||
self.max_depth = max_depth
|
self.max_depth = max_depth
|
||||||
doc_type = None
|
doc_type = None
|
||||||
|
|
||||||
if instance and isinstance(instance, Document):
|
if instance and isinstance(instance, (Document, TopLevelDocumentMetaclass)):
|
||||||
doc_type = instance._fields.get(name)
|
doc_type = instance._fields.get(name)
|
||||||
if hasattr(doc_type, 'field'):
|
if hasattr(doc_type, 'field'):
|
||||||
doc_type = doc_type.field
|
doc_type = doc_type.field
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue