diff options
author | Matthew Lemon <lemon@matthewlemon.com> | 2020-10-05 10:53:31 +0100 |
---|---|---|
committer | Matthew Lemon <lemon@matthewlemon.com> | 2020-10-05 10:53:31 +0100 |
commit | 22d18014f0d9913abf27c5eac38a727d919608e1 (patch) | |
tree | 53f8069f793be045eeb4b9e8f8bf0b710b1acfaa /ctrack/register/forms.py | |
parent | 04e8fa22dc488cb03a0c1ac3013bf65ebe0aac0e (diff) |
fixed cancel button redirects
Diffstat (limited to 'ctrack/register/forms.py')
-rw-r--r-- | ctrack/register/forms.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ctrack/register/forms.py b/ctrack/register/forms.py index 4f91bd8..2fc5ff1 100644 --- a/ctrack/register/forms.py +++ b/ctrack/register/forms.py @@ -14,7 +14,7 @@ class EngagementEventCreateForm(forms.ModelForm): super().__init__(*args, **kwargs) if caf: org = CAF.objects.get(pk=caf).organisation - cancel_redirect = reverse("core:home") + cancel_redirect = reverse("caf:detail", args=[caf]) self.fields["related_caf"].initial = caf self.fields["participants"].queryset = Person.objects.filter(organisation__pk=org.pk) self.fields["type"].queryset = EngagementType.objects.all().order_by("descriptor") @@ -44,7 +44,7 @@ class EngagementEventCreateForm(forms.ModelForm): ) else: org = get_object_or_404(Organisation, slug=org_slug) - cancel_redirect = reverse("core:home") + cancel_redirect = reverse("organisations:detail", args=[org_slug]) self.fields["participants"].queryset = Person.objects.filter(organisation__slug=org_slug) self.fields["type"].queryset = EngagementType.objects.all().order_by("descriptor") self.fields["related_caf"].queryset = org.caf_set.all() |