mirror of
https://github.com/encode/django-rest-framework.git
synced 2024-11-29 21:14:01 +03:00
Gotta love dynamic languages
This commit is contained in:
parent
54a02c1fb9
commit
5a5f24f263
|
@ -146,7 +146,7 @@ class Serializer(object):
|
||||||
# then the second element of the tuple is the fields to
|
# then the second element of the tuple is the fields to
|
||||||
# set on the related serializer
|
# set on the related serializer
|
||||||
if isinstance(info, (list, tuple)):
|
if isinstance(info, (list, tuple)):
|
||||||
class OnTheFlySerializer(Serializer):
|
class OnTheFlySerializer(self.__class__):
|
||||||
fields = info
|
fields = info
|
||||||
return OnTheFlySerializer
|
return OnTheFlySerializer
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user