Rename _.meta.virtual_fields to privat_fields
This commit is contained in:
parent
1c870de0f6
commit
e033fe3865
|
@ -12,7 +12,7 @@ def get_related_object(origin, max_depth=2):
|
|||
a use-case calls for it.
|
||||
"""
|
||||
def related_iterator(node):
|
||||
for field in node._meta.virtual_fields:
|
||||
for field in node._meta.private_fields:
|
||||
if hasattr(field, 'ct_field'):
|
||||
yield getattr(node, field.name)
|
||||
for field in node._meta.fields:
|
||||
|
|
|
@ -341,8 +341,8 @@ def create_resource_relation():
|
|||
except AttributeError:
|
||||
pass
|
||||
else:
|
||||
related._meta.virtual_fields = [
|
||||
field for field in related._meta.virtual_fields if field.rel.to != ResourceData
|
||||
related._meta.private_fields = [
|
||||
field for field in related._meta.private_fields if field.rel.to != ResourceData
|
||||
]
|
||||
|
||||
for ct, resources in Resource.objects.group_by('content_type').items():
|
||||
|
|
Loading…
Reference in New Issue