redirect to /chat only if no start_utc

pull/216/head
Aevann 2023-10-13 17:59:44 +03:00
parent 059204bb24
commit 1e2860d0dd
1 changed files with 3 additions and 1 deletions

View File

@ -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'])