diff --git a/backend/custom/graphql_auto.py b/backend/custom/graphql_auto.py index 48462b43..7b021d4d 100644 --- a/backend/custom/graphql_auto.py +++ b/backend/custom/graphql_auto.py @@ -429,6 +429,13 @@ def __init_subclass_with_meta__( _meta=_meta, input_fields=input_fields, **options ) + @classmethod + def perform_mutate(cls, form, info): + obj = form.save(commit=False) + obj.save() + form.save_m2m() + return cls(errors=[], **{cls._meta.return_field_name: obj}) + @classmethod def get_form_kwargs(cls, root, info, **input): # Get file data