mirror of
https://github.com/YunoHost-Apps/ihatemoney_ynh.git
synced 2024-09-03 19:26:15 +02:00
Bugfix : error when you access /authenticate url without a project identifier
This commit is contained in:
parent
a71d249e6c
commit
8b64762f71
1 changed files with 6 additions and 1 deletions
|
@ -72,7 +72,12 @@ def authenticate(project_id=None):
|
|||
if not form.id.data and request.args.get('project_id'):
|
||||
form.id.data = request.args['project_id']
|
||||
project_id = form.id.data
|
||||
project = False
|
||||
if project_id:
|
||||
project = Project.query.get(project_id)
|
||||
else:
|
||||
msg = _("You need to enter a project identifier")
|
||||
form.errors["id"] = [msg]
|
||||
create_project = False # We don't want to create the project by default
|
||||
if not project:
|
||||
# But if the user try to connect to an unexisting project, we will
|
||||
|
|
Loading…
Reference in a new issue