mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-02-02 20:54:42 +03:00
Remove unneeded arguments to save_object
This commit is contained in:
parent
32e0e5e18c
commit
56653111a6
|
@ -676,13 +676,10 @@ class ModelSerializer(Serializer):
|
||||||
if instance:
|
if instance:
|
||||||
return self.full_clean(instance)
|
return self.full_clean(instance)
|
||||||
|
|
||||||
def save_object(self, obj, parent=None, fk_field=None, **kwargs):
|
def save_object(self, obj, **kwargs):
|
||||||
"""
|
"""
|
||||||
Save the deserialized object and return it.
|
Save the deserialized object and return it.
|
||||||
"""
|
"""
|
||||||
if parent and fk_field:
|
|
||||||
setattr(self.object, fk_field, parent)
|
|
||||||
|
|
||||||
obj.save(**kwargs)
|
obj.save(**kwargs)
|
||||||
|
|
||||||
if getattr(obj, '_m2m_data', None):
|
if getattr(obj, '_m2m_data', None):
|
||||||
|
|
Loading…
Reference in New Issue
Block a user