mirror of
https://github.com/graphql-python/graphene-django.git
synced 2025-04-15 14:42:06 +03:00
fix graphene_django/forms/mutation.py to project style
This commit is contained in:
parent
be9cffab99
commit
a353f857e5
|
@ -189,13 +189,13 @@ class DjangoModelFormMutation(BaseDjangoFormMutation):
|
|||
@classmethod
|
||||
def get_form_kwargs(cls, root, info, **input):
|
||||
kwargs = super().get_form_kwargs(root, info, **input)
|
||||
instance = kwargs.get('instance')
|
||||
instance = kwargs.get("instance")
|
||||
if not instance:
|
||||
return kwargs
|
||||
|
||||
for field in kwargs.get('instance')._meta.fields:
|
||||
if field.name not in kwargs['data'] and field.name != 'id':
|
||||
kwargs['data'][field.name] = getattr(instance, field.name)
|
||||
for field in kwargs.get("instance")._meta.fields:
|
||||
if field.name not in kwargs["data"] and field.name != "id":
|
||||
kwargs["data"][field.name] = getattr(instance, field.name)
|
||||
return kwargs
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user