aboutsummaryrefslogtreecommitdiffstats
path: root/ctrack/register/forms.py
diff options
context:
space:
mode:
authorMatthew Lemon <lemon@matthewlemon.com>2020-10-21 14:49:36 +0100
committerMatthew Lemon <lemon@matthewlemon.com>2020-10-21 14:49:36 +0100
commitd4e6e7b3c8f10c6671cecea2c2ca42578678eb4a (patch)
tree5d50ce13ae5f391ac12a0ae37e39399649d91951 /ctrack/register/forms.py
parent6d2cd94729a20904d5970b895e686af40353868e (diff)
can now add caf single date events to caf detail page
Diffstat (limited to 'ctrack/register/forms.py')
-rw-r--r--ctrack/register/forms.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/ctrack/register/forms.py b/ctrack/register/forms.py
index 512ae9d..cca4cb9 100644
--- a/ctrack/register/forms.py
+++ b/ctrack/register/forms.py
@@ -107,7 +107,6 @@ class CAFSingleDateEventForm(forms.ModelForm):
fields = [
"type_descriptor",
"date",
- "related_caf",
"short_description",
"document_link",
"comments",
@@ -121,6 +120,7 @@ class CAFSingleDateEventForm(forms.ModelForm):
def save(self, **kwargs):
form = super().save(commit=False)
form.user = self.user
+ form.related_caf = CAF.objects.get(id=self.caf_id)
form.save()
return form