allow null when time field is not required (#5832)
* allow null when time field is not required * Update base_document.py
This commit is contained in:
parent
6a06e65d20
commit
803f6b0c7b
1 changed files with 1 additions and 1 deletions
|
|
@ -206,7 +206,7 @@ class BaseDocument(object):
|
|||
elif df.fieldtype in ("Currency", "Float", "Percent") and not isinstance(d[fieldname], float):
|
||||
d[fieldname] = flt(d[fieldname])
|
||||
|
||||
elif df.fieldtype in ("Datetime", "Date") and d[fieldname]=="":
|
||||
elif df.fieldtype in ("Datetime", "Date", "Time") and d[fieldname]=="":
|
||||
d[fieldname] = None
|
||||
|
||||
elif df.get("unique") and cstr(d[fieldname]).strip()=="":
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue