Repository: fossasia/open-event-server

Issue:
Custom Forms for a new user's event not being created
**Describe the bug**
<!-- A clear and concise description of what the bug is. -->
A server side extension of the bug fossasia/open-event-frontend#2205 

**To Reproduce**
Steps to reproduce the behavior:
1. First Logout of the session
2. Click on Create Event
3. Register a new user
4. Make a dummy event and publish it with tickets
5. Go to Event | Tickets  | Order Form

**Expected behavior**
<!-- A clear and concise description of what you expected to happen. -->
Custom Forms should've been created regardless of user status (new/old)

**Stacktrace**
<!-- If applicable, add stacktrace to help explain your problem. -->

```
(builtins.TypeError) Not a boolean value: True [SQL: 'INSERT INTO custom_forms (deleted_at, field_identifier, form, type, is_required, is_included, is_fixed, event_id) VALUES (%(deleted_at)s, %(field_identifier)s, %(form)s, %(type)s, %(is_required)s, %(is_included)s, %(is_fixed)s, %(event_id)s) RETURNING custom_forms.id'] [parameters: [{'is_fixed': True, 'type': ('text',), 'form': ('attendee',), 'field_identifier': ('firstname',), 'deleted_at': None, 'is_included': (True,), 'event_id': 8, 'is_required': (True,)}]]

sqlalchemy.exc.StatementError: (builtins.TypeError) Not a boolean value: True [SQL: 'INSERT INTO custom_forms (deleted_at, field_identifier, form, type, is_required, is_included, is_fixed, event_id) VALUES (%(deleted_at)s, %(field_identifier)s, %(form)s, %(type)s, %(is_required)s, %(is_included)s, %(is_fixed)s, %(event_id)s) RETURNING custom_forms.id'] [parameters: [{'is_fixed': True, 'type': ('text',), 'form': ('attendee',), 'field_identifier': ('firstname',), 'deleted_at': None, 'is_included': (True,), 'event_id': 8, 'is_required': (True,)}]]
ERROR:root:DB Exception! (builtins.TypeError) Not a boolean value: True [SQL: 'INSERT INTO custom_forms (deleted_at, field_identifier, form, type, is_required, is_included, is_fixed, event_id) VALUES (%(deleted_at)s, %(field_identifier)s, %(form)s, %(type)s, %(is_required)s, %(is_included)s, %(is_fixed)s, %(event_id)s) RETURNING custom_forms.id'] [parameters: [{'is_fixed': True, 'type': ('text',), 'form': ('attendee',), 'field_identifier': ('firstname',), 'deleted_at': None, 'is_included': (True,), 'event_id': 8, 'is_required': (True,)}]]
(builtins.TypeError) Not a boolean value: True [SQL: 'INSERT INTO custom_forms (deleted_at, field_identifier, form, type, is_required, is_included, is_fixed, event_id) VALUES (%(deleted_at)s, %(field_identifier)s, %(form)s, %(type)s, %(is_required)s, %(is_included)s, %(is_fixed)s, %(event_id)s) RETURNING custom_forms.id'] [parameters: [{'is_fixed': True, 'type': ('text',), 'form': ('attendee',), 'field_identifier': ('lastname',), 'deleted_at': None, 'is_included': (True,), 'event_id': 8, 'is_required': (True,)}]]

sqlalchemy.exc.StatementError: (builtins.TypeError) Not a boolean value: True [SQL: 'INSERT INTO custom_forms (deleted_at, field_identifier, form, type, is_required, is_included, is_fixed, event_id) VALUES (%(deleted_at)s, %(field_identifier)s, %(form)s, %(type)s, %(is_required)s, %(is_included)s, %(is_fixed)s, %(event_id)s) RETURNING custom_forms.id'] [parameters: [{'is_fixed': True, 'type': ('text',), 'form': ('attendee',), 'field_identifier': ('lastname',), 'deleted_at': None, 'is_included': (True,), 'event_id': 8, 'is_required': (True,)}]]
ERROR:root:DB Exception! (builtins.TypeError) Not a boolean value: True [SQL: 'INSERT INTO custom_forms (deleted_at, field_identifier, form, type, is_required, is_included, is_fixed, event_id) VALUES (%(deleted_at)s, %(field_identifier)s, %(form)s, %(type)s, %(is_required)s, %(is_included)s, %(is_fixed)s, %(event_id)s) RETURNING custom_forms.id'] [parameters: [{'is_fixed': True, 'type': ('text',), 'form': ('attendee',), 'field_identifier': ('lastname',), 'deleted_at': None, 'is_included': (True,), 'event_id': 8, 'is_required': (True,)}]]
(builtins.TypeError) Not a boolean value: True [SQL: 'INSERT INTO custom_forms (deleted_at, field_identifier, form, type, is_required, is_included, is_fixed, event_id) VALUES (%(deleted_at)s, %(field_identifier)s, %(form)s, %(type)s, %(is_required)s, %(is_included)s, %(is_fixed)s, %(event_id)s) RETURNING custom_forms.id'] [parameters: [{'is_fixed': True, 'type': ('email',), 'form': ('attendee',), 'field_identifier': ('email',), 'deleted_at': None, 'is_included': (True,), 'event_id': 8, 'is_required': (True,)}]]

```

**Additional details (please complete the following information):**
 - OS: [e.g. MacOS, Ubuntu, CentOS] Ubuntu
 - Python Version [e.g. `3.5`, `3.6`] 3.5 

**Additional context**
<!-- Add any other context about the problem here. -->
Working on it


Discussion:

Resolving patch:
diff --git a/app/models/custom_form.py b/app/models/custom_form.py
--- a/app/models/custom_form.py
+++ b/app/models/custom_form.py
@@ -88,11 +88,11 @@ def __init__(self,
                  is_fixed=None,
                  deleted_at=None):
         self.event_id = event_id
-        self.field_identifier = field_identifier,
-        self.form = form,
-        self.type = type,
-        self.is_required = is_required,
-        self.is_included = is_included,
+        self.field_identifier = field_identifier
+        self.form = form
+        self.type = type
+        self.is_required = is_required
+        self.is_included = is_included
         self.is_fixed = is_fixed
         self.deleted_at = deleted_at
 


Test patch: