Commit 66b4b0bd authored by HERBERT Ryan's avatar HERBERT Ryan

controllers/notification.py made expiration date mandatory

parent 73de087c
......@@ -66,7 +66,9 @@ def add_form():
error += "type needed, "
if request.vars["priority"] == "" :
error += "priority needed, "
if request.vars["expiration"] != "" :
if request.vars["expiration"] == "" :
erro += "expiration date required"
else:
try:
datetime.datetime.strptime(""+request.vars['expiration'], '%Y-%m-%d')
except ValueError:
......@@ -118,7 +120,9 @@ def edit_form():
error += "type needed, "
if request.vars["priority"] == "" :
error += "priority needed, "
if request.vars["expiration"] != "" :
if request.vars["expiration"] == "" :
error += "expiration date required"
else:
try:
datetime.datetime.strptime(""+request.vars['expiration'], '%Y-%m-%d')
except ValueError:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment