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
7
main.py
7
main.py
|
@ -54,9 +54,10 @@ 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"]:
|
||||||
if newPerson not in people:
|
newPerson = Person(result["name"], result["remark"])
|
||||||
people.append(newPerson)
|
if newPerson not in people:
|
||||||
|
people.append(newPerson)
|
||||||
return redirect("/")
|
return redirect("/")
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue