diff options
| author | Alen Mujezinovic | 2012-03-01 13:17:29 +0000 |
|---|---|---|
| committer | Alen Mujezinovic | 2012-03-01 13:17:29 +0000 |
| commit | 537fa19bacd97743555b3cac2a3e3c6e14786124 (patch) | |
| tree | f9dc475c0a7c8200b6f53a642fec490ed48389d4 /djangorestframework/serializer.py | |
| parent | 0a57cf98766ebbf22900024608faefbca3bdde6b (diff) | |
| download | django-rest-framework-537fa19bacd97743555b3cac2a3e3c6e14786124.tar.bz2 | |
Whoops. Adding the .parent attribute to the Serializer class broke
getattr(self,'parent',self). This fixes it.
Diffstat (limited to 'djangorestframework/serializer.py')
| -rw-r--r-- | djangorestframework/serializer.py | 2 |
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) |
