Skip to content

Commit

Permalink
fix: default maintenance flag to false (for now)
Browse files Browse the repository at this point in the history
  • Loading branch information
M7mdisk committed Aug 26, 2024
1 parent f88fea6 commit 256de3c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion webapp/decorators.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,9 @@ def store_maintenance(func):

@functools.wraps(func)
def is_store_in_maintenance(*args, **kwargs):
if strtobool(os.getenv("MAINTENANCE")):
# TODO: this will be a config option for the charm
# or used from the app config using from_prefexed_env
if strtobool(os.getenv("MAINTENANCE", "false")):
return flask.render_template("maintenance.html")

return func(*args, **kwargs)
Expand Down

0 comments on commit 256de3c

Please sign in to comment.