uranusjr commented on code in PR #32525:
URL: https://github.com/apache/airflow/pull/32525#discussion_r1263538156
##########
airflow/www/views.py:
##########
@@ -617,13 +618,13 @@ def show_traceback(error):
return (
render_template(
"airflow/traceback.html",
- python_version=sys.version.split(" ")[0] if
auth_manager.is_logged_in() else "redact",
- airflow_version=version if auth_manager.is_logged_in() else
"redact",
+ python_version=sys.version.split(" ")[0] if
get_auth_manager().is_logged_in() else "redact",
+ airflow_version=version if get_auth_manager().is_logged_in() else
"redact",
hostname=get_hostname()
- if conf.getboolean("webserver", "EXPOSE_HOSTNAME") and
auth_manager.is_logged_in()
+ if conf.getboolean("webserver", "EXPOSE_HOSTNAME") and
get_auth_manager().is_logged_in()
else "redact",
info=traceback.format_exc()
- if conf.getboolean("webserver", "EXPOSE_STACKTRACE") and
auth_manager.is_logged_in()
+ if conf.getboolean("webserver", "EXPOSE_STACKTRACE") and
get_auth_manager().is_logged_in()
Review Comment:
Since `is_logged_in()` is not free, this should be a good time to refactor
this so we call it only once.
--
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]