mirror of
https://github.com/graphql-python/graphene-django.git
synced 2025-07-13 01:32:24 +03:00
use to_represenation
in favor of get_attribute
This commit is contained in:
parent
b8a2d5953a
commit
23efdb8489
|
@ -137,10 +137,5 @@ class SerializerMutation(ClientIDMutation):
|
|||
@classmethod
|
||||
def perform_mutate(cls, serializer, info):
|
||||
obj = serializer.save()
|
||||
|
||||
kwargs = {}
|
||||
for f, field in serializer.fields.items():
|
||||
if not field.write_only:
|
||||
kwargs[f] = field.get_attribute(obj)
|
||||
|
||||
kwargs = serializer.to_representation(obj)
|
||||
return cls(errors=None, **kwargs)
|
||||
|
|
Loading…
Reference in New Issue
Block a user