Skip to content
Snippets Groups Projects
Commit 03a763a0 authored by magicfelix's avatar magicfelix
Browse files

Do not set null fields

parent 876bab6c
No related branches found
No related tags found
1 merge request!78Resolve "Rewrite registration wizard"
......@@ -107,7 +107,7 @@ class SendEventRegistrationMutation(graphene.Mutation):
# Store contact information in database
for field_name in ["date_of_birth", "sex", "address", "mobile_number"]:
if event_registration["person"] is not None and event_registration["person"][field_name] != "":
if event_registration["person"] is not None and event_registration["person"][field_name] is not None and event_registration["person"][field_name] != "":
if field_name == "address":
for addr_field in ["street", "housenumber", "postal_code", "place"]:
setattr(person, addr_field, event_registration["person"]["address"][addr_field])
......
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