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():
|
||||
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("/")
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue