mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-08-05 21:10:13 +03:00
flake
This commit is contained in:
parent
09aff6daeb
commit
25fee8e07b
|
@ -1295,8 +1295,8 @@ class RecursiveField(Field):
|
|||
|
||||
def __init__(self, **kwargs):
|
||||
field_kwargs = dict(
|
||||
(key, value)
|
||||
for key in kwargs
|
||||
(key, kwargs[key])
|
||||
for key in kwargs
|
||||
if key in inspect.getargspec(Field.__init__)
|
||||
)
|
||||
super(RecursiveField, self).__init__(**field_kwargs)
|
||||
|
@ -1305,7 +1305,7 @@ class RecursiveField(Field):
|
|||
super(RecursiveField, self).bind(field_name, parent)
|
||||
|
||||
real_dict = object.__getattribute__(self, '__dict__')
|
||||
|
||||
|
||||
if hasattr(parent, 'child') and parent.child is self:
|
||||
proxy_class = parent.parent.__class__
|
||||
else:
|
||||
|
@ -1329,6 +1329,7 @@ class RecursiveField(Field):
|
|||
else:
|
||||
real_dict[name] = value
|
||||
|
||||
|
||||
class SerializerMethodField(Field):
|
||||
"""
|
||||
A read-only field that get its representation from calling a method on the
|
||||
|
|
|
@ -358,6 +358,7 @@ class TestRecursiveField:
|
|||
assert serializer.validated_data == value, \
|
||||
'deserialized data does not match input'
|
||||
|
||||
|
||||
# Tests for field input and output values.
|
||||
# ----------------------------------------
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user