forgot to check for an empty name

This commit is contained in:
Jan-Pieter Baert 2019-01-30 18:04:40 +01:00
parent b2490eac05
commit 1b21fa1f38
No known key found for this signature in database
GPG key ID: B19186932178234A

View file

@ -54,9 +54,10 @@ def statusUpdate():
def addPerson():
if request.method == "POST":
result = request.form
newPerson = Person(request.form["name"], request.form["remark"])
if newPerson not in people:
people.append(newPerson)
if result["name"]:
newPerson = Person(result["name"], result["remark"])
if newPerson not in people:
people.append(newPerson)
return redirect("/")