mirror of
https://github.com/bunkerity/bunkerweb
synced 2026-05-24 09:28:37 +00:00
fix: adjust admin age check to use local timezone to avoid comparison of offset-naive and offset-aware datetimes
This commit is contained in:
parent
59c70b51e6
commit
3af012b341
1 changed files with 1 additions and 1 deletions
|
|
@ -249,7 +249,7 @@ def setup_loading():
|
|||
db_config = DB.get_config(filtered_settings=("SERVER_NAME", "USE_UI", "REVERSE_PROXY_URL"))
|
||||
ui_service = {}
|
||||
ui_admin = DB.get_ui_user()
|
||||
admin_old_enough = ui_admin and ui_admin.creation_date < datetime.now() - timedelta(minutes=5)
|
||||
admin_old_enough = ui_admin and ui_admin.creation_date < datetime.now().astimezone() - timedelta(minutes=5)
|
||||
|
||||
for server_name in db_config["SERVER_NAME"].split(" "):
|
||||
if server_name and db_config.get(f"{server_name}_USE_UI", "no") == "yes":
|
||||
|
|
|
|||
Loading…
Reference in a new issue