From 1e2860d0dddbc0813637aa93881d08c1ef67d313 Mon Sep 17 00:00:00 2001 From: Aevann Date: Fri, 13 Oct 2023 17:59:44 +0300 Subject: [PATCH] redirect to /chat only if no start_utc --- files/routes/admin.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/files/routes/admin.py b/files/routes/admin.py index 1401356e0..9a9e4fce3 100644 --- a/files/routes/admin.py +++ b/files/routes/admin.py @@ -1965,8 +1965,10 @@ def schedule_orgy(v): if start_utc: start_utc = int(start_utc) + redir = '/admin/orgy' else: start_utc = int(time.time()) + redir = '/chat' if bare_youtube_regex.match(normalized_link): orgy_type = 'youtube' @@ -2005,7 +2007,7 @@ def schedule_orgy(v): ) g.db.add(ma) - return redirect('/chat') + return redirect(redir) @app.post("/admin/stop_orgy") @admin_level_required(PERMS['ORGIES'])