From ee7e783f2a58d5f211acba68ceae98176eeb27e0 Mon Sep 17 00:00:00 2001 From: Son NK Date: Sat, 25 Apr 2020 15:31:20 +0200 Subject: [PATCH] keep sort param when redirecting back to index --- app/dashboard/views/index.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/app/dashboard/views/index.py b/app/dashboard/views/index.py index ca083d62..40c981e0 100644 --- a/app/dashboard/views/index.py +++ b/app/dashboard/views/index.py @@ -57,7 +57,10 @@ def index(): return redirect( url_for( - "dashboard.index", highlight_alias_id=alias.id, query=query, + "dashboard.index", + highlight_alias_id=alias.id, + query=query, + sort=sort, ) ) else: @@ -69,7 +72,12 @@ def index(): if not alias: flash("Unknown error, sorry for the inconvenience", "error") return redirect( - url_for("dashboard.index", highlight_alias_id=alias.id, query=query) + url_for( + "dashboard.index", + highlight_alias_id=alias.id, + query=query, + sort=sort, + ) ) LOG.d("delete gen email %s", alias)