RNHTTR commented on code in PR #39701:
URL: https://github.com/apache/airflow/pull/39701#discussion_r1607086380
##########
airflow/www/views.py:
##########
@@ -785,13 +787,25 @@ def index(self):
# Remove the reset_tags=reset from the URL
return redirect(url_for("Airflow.index"))
+ if arg_lastrun_filter == "reset_filter":
+ flask_session[FILTER_LASTRUN_COOKIE] = None
+ return redirect(url_for("Airflow.index"))
+
cookie_val = flask_session.get(FILTER_TAGS_COOKIE)
if arg_tags_filter:
flask_session[FILTER_TAGS_COOKIE] = ",".join(arg_tags_filter)
elif cookie_val:
# If tags exist in cookie, but not URL, add them to the URL
return redirect(url_for("Airflow.index",
tags=cookie_val.split(",")))
+ cookie_val = flask_session.get(FILTER_LASTRUN_COOKIE)
Review Comment:
Overwriting `cookie_val` seems risky. IMO all `cookie_val`s should be
updated to be explicit, for example `filter_tags_cookie_value` and
`filter_lastrun_cookie_value`.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]