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