keep sort param when redirecting back to index

This commit is contained in:
Son NK 2020-04-25 15:31:20 +02:00
parent a2666cc4fe
commit ee7e783f2a

View file

@ -57,7 +57,10 @@ def index():
return redirect( return redirect(
url_for( url_for(
"dashboard.index", highlight_alias_id=alias.id, query=query, "dashboard.index",
highlight_alias_id=alias.id,
query=query,
sort=sort,
) )
) )
else: else:
@ -69,7 +72,12 @@ def index():
if not alias: if not alias:
flash("Unknown error, sorry for the inconvenience", "error") flash("Unknown error, sorry for the inconvenience", "error")
return redirect( 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) LOG.d("delete gen email %s", alias)