Skip to content

Commit

Permalink
fix: docs should build again (FlexMeasures#1224)
Browse files Browse the repository at this point in the history
Signed-off-by: F.N. Claessen <[email protected]>
  • Loading branch information
Flix6x authored Oct 26, 2024
1 parent de652a7 commit e4077a9
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions flexmeasures/ui/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,10 +118,11 @@ def basic_admin_auth():
return

# Logged-in users can view queues on the demo server, but only admins can view them on other servers
if app.config.get("FLEXMEASURES_MODE", "") == "demo":
rq_dashboard.blueprint.before_request(basic_auth)
else:
rq_dashboard.blueprint.before_request(basic_admin_auth)
if app.config.get("FLEXMEASURES_ENV") != "documentation":
if app.config.get("FLEXMEASURES_MODE", "") == "demo":
rq_dashboard.blueprint.before_request(basic_auth)
else:
rq_dashboard.blueprint.before_request(basic_admin_auth)

# To set template variables, use set_global_template_variables in app.py
app.register_blueprint(rq_dashboard.blueprint, url_prefix="/tasks")
Expand Down

0 comments on commit e4077a9

Please sign in to comment.