From e2e55da58361f99ed83e2a864cdeb7fd4f17f464 Mon Sep 17 00:00:00 2001 From: Rob Atkinson <rob@metalinkage.com.au> Date: Mon, 5 Nov 2018 21:29:43 +1100 Subject: [PATCH] reinstated nested/extra fields --- djangoldp/serializers.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/djangoldp/serializers.py b/djangoldp/serializers.py index e0ba2de1..3d338b63 100644 --- a/djangoldp/serializers.py +++ b/djangoldp/serializers.py @@ -85,8 +85,7 @@ class LDPSerializer(HyperlinkedModelSerializer): fields = list(self.Meta.model._meta.serializer_fields) except: fields = super().get_default_field_names(declared_fields, model_info) - - return fields + return fields + list(getattr(self.Meta, 'extra_fields', [])) def to_representation(self, obj): data = super().to_representation(obj) -- GitLab