From e033fe38651baed3f8aa06e09be26e6a6e0dcf7e Mon Sep 17 00:00:00 2001 From: Marc Aymerich Date: Tue, 15 Nov 2016 09:05:16 +0000 Subject: [PATCH] Rename _.meta.virtual_fields to privat_fields --- orchestra/contrib/orders/helpers.py | 2 +- orchestra/contrib/resources/models.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/orchestra/contrib/orders/helpers.py b/orchestra/contrib/orders/helpers.py index 7f08864b..b5e1487a 100644 --- a/orchestra/contrib/orders/helpers.py +++ b/orchestra/contrib/orders/helpers.py @@ -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: diff --git a/orchestra/contrib/resources/models.py b/orchestra/contrib/resources/models.py index 9ebd92b9..143d0496 100644 --- a/orchestra/contrib/resources/models.py +++ b/orchestra/contrib/resources/models.py @@ -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():