diff options
| author | Alexis Metaireau <alexis@notmyidea.org> | 2011-09-14 14:52:17 +0200 |
|---|---|---|
| committer | Alexis Metaireau <alexis@notmyidea.org> | 2011-09-14 14:52:17 +0200 |
| commit | 7bf349296173e1d3d5b006ace0839c512ad33686 (patch) | |
| tree | 2c193346a92cf9fb69982820819041f83f9801d5 /budget | |
| parent | 1b8258a52110cd8eac2f2012e99cf6c16153a839 (diff) | |
| parent | 6212b643ec97e5708a1dc5af39e3f9eb35c01405 (diff) | |
| download | ihatemoney-mirror-7bf349296173e1d3d5b006ace0839c512ad33686.zip ihatemoney-mirror-7bf349296173e1d3d5b006ace0839c512ad33686.tar.gz ihatemoney-mirror-7bf349296173e1d3d5b006ace0839c512ad33686.tar.bz2 | |
Merge branch 'master' of github.com:ametaireau/budget-manager
Diffstat (limited to 'budget')
| -rw-r--r-- | budget/web.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/budget/web.py b/budget/web.py index 5667b05..7376135 100644 --- a/budget/web.py +++ b/budget/web.py @@ -63,7 +63,7 @@ def pull_project(endpoint, values): def authenticate(project_id=None): """Authentication form""" form = AuthenticationForm() - if not form.id.data and request.args['project_id']: + 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) @@ -71,7 +71,10 @@ def authenticate(project_id=None): if not project: # But if the user try to connect to an unexisting project, we will # propose him a link to the creation form. - create_project = project_id + if request.method == "POST": + form.validate() + else: + create_project = project_id else: # if credentials are already in session, redirect |
