diff options
author | Matthew Lemon <lemon@matthewlemon.com> | 2020-10-24 15:22:52 +0100 |
---|---|---|
committer | Matthew Lemon <lemon@matthewlemon.com> | 2020-10-24 15:22:52 +0100 |
commit | 457cd45a13a4cd73626d70367be1179a070700f3 (patch) | |
tree | 481f6c34cd13a81d187cadd1598de6ad91cffb6e | |
parent | 1227508f15e7f4379db7bad747d8e91c840b818e (diff) |
fixed failing test
-rw-r--r-- | ctrack/register/forms.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/ctrack/register/forms.py b/ctrack/register/forms.py index a6db25f..f743514 100644 --- a/ctrack/register/forms.py +++ b/ctrack/register/forms.py @@ -34,12 +34,11 @@ class CreateNoteEventForm(forms.ModelForm): def __init__(self, *args, **kwargs): self.user = kwargs.pop("user") if kwargs.get("org_slug"): - got_org = True self.org_slug = kwargs.pop("org_slug") - super().__init__(*args, **kwargs) - if got_org : + super().__init__(*args, **kwargs) self.fields["organisation"].queryset = Organisation.objects.filter(slug=self.org_slug) else: + super().__init__(*args, **kwargs) self.fields["organisation"].queryset = Organisation.objects.all().order_by('name') def save(self, commit=True, **kwargs): |