From 1c8853341a26dea16dc42d8e087390d91cd63f3d 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."