aboutsummaryrefslogtreecommitdiffstats
path: root/djangorestframework/serializer.py
diff options
context:
space:
mode:
Diffstat (limited to 'djangorestframework/serializer.py')
-rw-r--r--djangorestframework/serializer.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/djangorestframework/serializer.py b/djangorestframework/serializer.py
index f30667f1..d000ad96 100644
--- a/djangorestframework/serializer.py
+++ b/djangorestframework/serializer.py
@@ -138,7 +138,7 @@ class Serializer(object):
if isinstance(info, (list, tuple)):
class OnTheFlySerializer(self.__class__):
fields = info
- parent = getattr(self, 'parent', self)
+ parent = getattr(self, 'parent') or self
return OnTheFlySerializer
# If an element in `fields` is a 2-tuple of (str, Serializer)