mirror of
https://github.com/graphql-python/graphene-django.git
synced 2025-07-07 22:03:12 +03:00
little fix
This commit is contained in:
parent
a353f857e5
commit
c8b0732bbb
|
@ -193,7 +193,7 @@ class DjangoModelFormMutation(BaseDjangoFormMutation):
|
||||||
if not instance:
|
if not instance:
|
||||||
return kwargs
|
return kwargs
|
||||||
|
|
||||||
for field in kwargs.get("instance")._meta.fields:
|
for field in instance._meta.fields:
|
||||||
if field.name not in kwargs["data"] and field.name != "id":
|
if field.name not in kwargs["data"] and field.name != "id":
|
||||||
kwargs["data"][field.name] = getattr(instance, field.name)
|
kwargs["data"][field.name] = getattr(instance, field.name)
|
||||||
return kwargs
|
return kwargs
|
||||||
|
|
Loading…
Reference in New Issue
Block a user