Commit 919aff32 by Marko Tibold

Fix AttributeError caused by accessing a non-existing default_keys attribute.

parent c65f22e0
...@@ -123,7 +123,7 @@ class BaseSerializer(Field): ...@@ -123,7 +123,7 @@ class BaseSerializer(Field):
Returns the fieldnames that should not be validated. Returns the fieldnames that should not be validated.
""" """
excluded_fields = list(self.opts.exclude) excluded_fields = list(self.opts.exclude)
for field in self.fields.keys() + self.default_fields.keys(): for field in self.fields.keys() + self.get_default_fields().keys():
if self.opts.fields: if self.opts.fields:
if field not in self.opts.fields + self.opts.exclude: if field not in self.opts.fields + self.opts.exclude:
excluded_fields.append(field) excluded_fields.append(field)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment