From 7cd0dc845aeff4748b35b0ab4aee2d0a387d3291 Mon Sep 17 00:00:00 2001 From: b3yond Date: Fri, 11 Jan 2019 12:15:28 +0100 Subject: [PATCH] check if account already exists #37 --- frontend.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/frontend.py b/frontend.py index 37144d3..0ea9d1f 100755 --- a/frontend.py +++ b/frontend.py @@ -56,6 +56,9 @@ def register_post(): @get('/confirm//') @view('template/propaganda.tpl') def confirm(city, token): + # check whether city already exists + if db.by_city(city): + return dict(error='Account already exists.') # create db-entry if db.confirm(token, city): # :todo show info "Account creation successful."