mirror of
https://github.com/encode/django-rest-framework.git
synced 2024-12-17 21:56:48 +03:00
Whoops. Adding the .parent attribute to the Serializer class broke
getattr(self,'parent',self). This fixes it.
This commit is contained in:
parent
0a57cf9876
commit
537fa19bac
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue
Block a user