diff --git a/importer/jinja2/eu-importer/notify-success.jinja b/importer/jinja2/eu-importer/notify-success.jinja index 17b495110..3bba97dbd 100644 --- a/importer/jinja2/eu-importer/notify-success.jinja +++ b/importer/jinja2/eu-importer/notify-success.jinja @@ -13,7 +13,7 @@ {"text": "Home", "href": url("home")}, {"text": "Edit an existing workbasket", "href": url("workbaskets:workbasket-ui-list")}, {"text": "Workbasket " ~ request.session.workbasket.id ~ " - Review goods", - "href": url("workbaskets:workbasket-ui-review-goods")}, + "href": url("workbaskets:workbasket-ui-review-goods", kwargs={"pk": request.session.workbasket.id})}, {"text": page_title} ] }) }} @@ -30,7 +30,7 @@ }) }}
diff --git a/measures/views.py b/measures/views.py index 13df16d98..24ac89c68 100644 --- a/measures/views.py +++ b/measures/views.py @@ -547,7 +547,12 @@ def done(self, form_list, **kwargs): ) self.session_store.clear() - return redirect(reverse("workbaskets:workbasket-ui-review-measures")) + return redirect( + reverse( + "workbaskets:workbasket-ui-review-measures", + kwargs={"pk": workbasket.pk}, + ), + ) @method_decorator(require_current_workbasket, name="dispatch") @@ -1229,17 +1234,23 @@ def post(self, request): # The user has cancelled out of the deletion process. return redirect("home") + workbasket = WorkBasket.current(request) object_list = self.get_queryset() for obj in object_list: # make a new version of the object with an update type of delete. obj.new_version( - workbasket=WorkBasket.current(request), + workbasket=workbasket, update_type=UpdateType.DELETE, ) self.session_store.clear() - return redirect(reverse("workbaskets:workbasket-ui-review-measures")) + return redirect( + reverse( + "workbaskets:workbasket-ui-review-measures", + kwargs={"pk": workbasket.pk}, + ), + ) class MeasureSelectionUpdate(MeasureSessionStoreMixin, View): diff --git a/workbaskets/jinja2/includes/workbaskets/navigation.jinja b/workbaskets/jinja2/includes/workbaskets/navigation.jinja index 4d265bf27..c1a24c9c9 100644 --- a/workbaskets/jinja2/includes/workbaskets/navigation.jinja +++ b/workbaskets/jinja2/includes/workbaskets/navigation.jinja @@ -11,7 +11,7 @@ View violations ({{request.session.workbasket.error_count}})