Skip to content
Snippets Groups Projects
Commit da326bb7 authored by Hangzhi Yu's avatar Hangzhi Yu
Browse files

Fix automatic setting of owner

parent bf718298
No related branches found
No related tags found
1 merge request!1314Resolve "Allow for creation of simple events"
Pipeline #154226 failed
......@@ -51,9 +51,9 @@ class CustomEventCreateMutation(DjangoCreateMutation):
return cls._meta.permissions
@classmethod
def before_save(cls, root, info, input, obj: CustomEvent): # noqa
obj.owner = info.context.user.person
return obj
def before_mutate(cls, root, info, input): # noqa
input["owner"] = info.context.user.person.id
return input
@classmethod
def handle_datetime_start(cls, value, name, info):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment