forgot to check for an empty name
This commit is contained in:
parent
b2490eac05
commit
1b21fa1f38
1 changed files with 4 additions and 3 deletions
3
main.py
3
main.py
|
@ -54,7 +54,8 @@ def statusUpdate():
|
||||||
def addPerson():
|
def addPerson():
|
||||||
if request.method == "POST":
|
if request.method == "POST":
|
||||||
result = request.form
|
result = request.form
|
||||||
newPerson = Person(request.form["name"], request.form["remark"])
|
if result["name"]:
|
||||||
|
newPerson = Person(result["name"], result["remark"])
|
||||||
if newPerson not in people:
|
if newPerson not in people:
|
||||||
people.append(newPerson)
|
people.append(newPerson)
|
||||||
return redirect("/")
|
return redirect("/")
|
||||||
|
|
Loading…
Reference in a new issue