aboutsummaryrefslogtreecommitdiffstats
path: root/ctrack/register/forms.py
diff options
context:
space:
mode:
authorMatthew Lemon <matt@matthewlemon.com>2020-10-18 15:37:21 +0100
committerMatthew Lemon <matt@matthewlemon.com>2020-10-18 15:37:21 +0100
commitd6a3d976e0a7bd2bde93a5ea5543e9e68922520d (patch)
tree3d02114cb0d676a870959288f2281e61b541150b /ctrack/register/forms.py
parentd25f73ff06f3daa428e0e87f42b83d071a31cc02 (diff)
fixed some tests
Diffstat (limited to 'ctrack/register/forms.py')
-rw-r--r--ctrack/register/forms.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/ctrack/register/forms.py b/ctrack/register/forms.py
index b061ec3..39900e6 100644
--- a/ctrack/register/forms.py
+++ b/ctrack/register/forms.py
@@ -33,9 +33,13 @@ class CreateSimpleDateTimeEventForm(forms.ModelForm):
]
def __init__(self, *args, **kwargs):
+ self.event_type = None
self.user = kwargs.pop("user")
self.org_slug = kwargs.pop("org_slug")
- self.event_type = kwargs.pop("event_type")
+ try:
+ self.event_type = kwargs.pop("event_type")
+ except KeyError:
+ pass
super().__init__(*args, **kwargs)
if self.org_slug:
org = Organisation.objects.get(slug=self.org_slug)