Skip to content
Snippets Groups Projects
Commit ff616aab authored by Hangzhi Yu's avatar Hangzhi Yu
Browse files

Fix redirect error of seating plan edit forms

parent 020db15f
No related branches found
No related tags found
No related merge requests found
Pipeline #114885 failed
...@@ -22,6 +22,11 @@ Added ...@@ -22,6 +22,11 @@ Added
* Support for usage with new AlekSIS SPA. * Support for usage with new AlekSIS SPA.
Fixed
~~~~~
* In some cases, seating plan edit forms caused an error when trying to redirect after they were filled successfully.
`1.0.2`_ - 2022-11-04 `1.0.2`_ - 2022-11-04
--------------------- ---------------------
......
...@@ -48,7 +48,7 @@ class SeatingPlanDetailView(PermissionRequiredMixin, DetailView): ...@@ -48,7 +48,7 @@ class SeatingPlanDetailView(PermissionRequiredMixin, DetailView):
@method_decorator(never_cache, name="dispatch") @method_decorator(never_cache, name="dispatch")
class SeatingPlanCreateView(PermissionRequiredMixin, SuccessNextMixin, AdvancedCreateView): class SeatingPlanCreateView(PermissionRequiredMixin, AdvancedCreateView):
"""Create view for seating plans.""" """Create view for seating plans."""
model = SeatingPlan model = SeatingPlan
...@@ -138,7 +138,7 @@ class SeatingPlanEditView(PermissionRequiredMixin, SuccessNextMixin, AdvancedEdi ...@@ -138,7 +138,7 @@ class SeatingPlanEditView(PermissionRequiredMixin, SuccessNextMixin, AdvancedEdi
@method_decorator(never_cache, name="dispatch") @method_decorator(never_cache, name="dispatch")
class SeatingPlanCopyView(PermissionRequiredMixin, SuccessNextMixin, AdvancedEditView): class SeatingPlanCopyView(PermissionRequiredMixin, AdvancedEditView):
"""Copy view for seating plans.""" """Copy view for seating plans."""
model = SeatingPlan model = SeatingPlan
...@@ -147,7 +147,7 @@ class SeatingPlanCopyView(PermissionRequiredMixin, SuccessNextMixin, AdvancedEdi ...@@ -147,7 +147,7 @@ class SeatingPlanCopyView(PermissionRequiredMixin, SuccessNextMixin, AdvancedEdi
template_name = "stoelindeling/seating_plan/copy.html" template_name = "stoelindeling/seating_plan/copy.html"
def get_success_url(self): def get_success_url(self):
return reverse("edit_seating_plan", args=[self.new_object.pk]) # FiXME NEXT URL return reverse("edit_seating_plan", args=[self.new_object.pk])
def get_form_kwargs(self): def get_form_kwargs(self):
kwargs = super().get_form_kwargs() kwargs = super().get_form_kwargs()
...@@ -176,7 +176,7 @@ class SeatingPlanCopyView(PermissionRequiredMixin, SuccessNextMixin, AdvancedEdi ...@@ -176,7 +176,7 @@ class SeatingPlanCopyView(PermissionRequiredMixin, SuccessNextMixin, AdvancedEdi
@method_decorator(never_cache, name="dispatch") @method_decorator(never_cache, name="dispatch")
class SeatingPlanDeleteView( class SeatingPlanDeleteView(
PermissionRequiredMixin, RevisionMixin, SuccessNextMixin, AdvancedDeleteView PermissionRequiredMixin, RevisionMixin, AdvancedDeleteView
): ):
"""Delete view for seating plans.""" """Delete view for seating plans."""
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment