forked from platypush/platypush
FIX: Still redirect to /register by default if no users have been created
This commit is contained in:
parent
5f09d449f4
commit
aa5b52db2f
1 changed files with 2 additions and 1 deletions
|
@ -213,7 +213,8 @@ def authenticate(
|
|||
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):
|
||||
@wraps(f)
|
||||
|
|
Loading…
Reference in a new issue