diff options
author | Matthew Lemon <lemon@matthewlemon.com> | 2020-10-20 09:37:24 +0100 |
---|---|---|
committer | Matthew Lemon <lemon@matthewlemon.com> | 2020-10-20 09:37:45 +0100 |
commit | 025f217a973fc91a273afc3b5b5e6a62c5fa7328 (patch) | |
tree | 4bcbdd9619a55532650e5e208c2f40cb36d269bc /ctrack/register/forms.py | |
parent | 990807fa2fcdea85c20e42359a00fbe0fa3a21d0 (diff) |
added Note form - tests passing
Diffstat (limited to '')
-rw-r--r-- | ctrack/register/forms.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/ctrack/register/forms.py b/ctrack/register/forms.py index 65c954b..8b0452f 100644 --- a/ctrack/register/forms.py +++ b/ctrack/register/forms.py @@ -22,8 +22,8 @@ class CreateNoteEventForm(forms.ModelForm): class Meta: model = NoteEvent fields = [ - "type_descriptor", "short_description", + "organisation", "comments", "private", "url", @@ -34,6 +34,7 @@ class CreateNoteEventForm(forms.ModelForm): def __init__(self, *args, **kwargs): self.user = kwargs.pop("user") super().__init__(*args, **kwargs) + self.fields["organisation"].queryset = Organisation.objects.all().order_by('name') def save(self, commit=True, **kwargs): new_note = super().save(commit=False) |