From 96a62e707298bb99e2345255db5a505b4a44cb51 Mon Sep 17 00:00:00 2001 From: Cayo Puigdefabregas Date: Wed, 26 Jan 2022 12:29:03 +0100 Subject: [PATCH] fix redirect when remove one tag --- ereuse_devicehub/inventory/views.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ereuse_devicehub/inventory/views.py b/ereuse_devicehub/inventory/views.py index e71180d7..57bd7aa2 100644 --- a/ereuse_devicehub/inventory/views.py +++ b/ereuse_devicehub/inventory/views.py @@ -212,7 +212,8 @@ class TagDeviceDeleteView(View): if form.validate_on_submit(): form.remove() - return flask.redirect(request.referrer) + next_url = url_for('inventory.devices.devicelist') + return flask.redirect(next_url) return flask.render_template(self.template_name, form=form, referrer=request.referrer)