FIX: Still redirect to /register by default if no users have been created

This commit is contained in:
Fabio Manganiello 2022-10-10 01:36:28 +02:00
parent 5f09d449f4
commit aa5b52db2f
Signed by: blacklight
GPG key ID: D90FBA7F76362774

View file

@ -213,7 +213,8 @@ def authenticate(
412, 412,
) )
return redirect('/login?redirect=' + (redirect_page or request.url), 307) target_page = 'login' if has_users else 'register'
return redirect(f'/{target_page}?redirect={redirect_page or request.url}', 307)
def decorator(f): def decorator(f):
@wraps(f) @wraps(f)