forked from ScoDoc/ScoDoc
fix date_expiration
This commit is contained in:
parent
12b903f02e
commit
9c51deed48
@ -397,9 +397,12 @@ def create_user_form(REQUEST, user_name=None, edit=0):
|
||||
del vals["status"] # no one can't change its own status
|
||||
if "date_expiration" in vals:
|
||||
try:
|
||||
if vals["date_expiration"]:
|
||||
vals["date_expiration"] = datetime.datetime.strptime(
|
||||
vals["date_expiration"], "%d/%m/%Y"
|
||||
)
|
||||
else:
|
||||
vals["date_expiration"] = None
|
||||
except ValueError:
|
||||
H.append(tf_error_message("date expiration invalide"))
|
||||
return "\n".join(H) + "\n" + tf[1] + F
|
||||
|
Loading…
Reference in New Issue
Block a user