diff options
| author | A.Avenel <avenel.alexandre@gmail.com> | 2013-06-23 17:37:58 +0200 |
|---|---|---|
| committer | A.Avenel <avenel.alexandre@gmail.com> | 2013-06-23 17:37:58 +0200 |
| commit | 8b64762f71f9a558985f4c90a820969ee6fb5ca0 (patch) | |
| tree | a6ceab30b62d1ccc07f30d09252c2230b2b47c6a /budget | |
| parent | a71d249e6c35b9a204d50e40365945c359ee5b63 (diff) | |
| download | ihatemoney-mirror-8b64762f71f9a558985f4c90a820969ee6fb5ca0.zip ihatemoney-mirror-8b64762f71f9a558985f4c90a820969ee6fb5ca0.tar.gz ihatemoney-mirror-8b64762f71f9a558985f4c90a820969ee6fb5ca0.tar.bz2 | |
Bugfix : error when you access /authenticate url without a project identifier
Diffstat (limited to 'budget')
| -rw-r--r-- | budget/web.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/budget/web.py b/budget/web.py index 0b302cd..44105ca 100644 --- a/budget/web.py +++ b/budget/web.py @@ -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 = Project.query.get(project_id) + 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 |
