From 803f6b0c7b5b0520b900cc4aa7423d3b67aa9d87 Mon Sep 17 00:00:00 2001 From: Mohamed_Alsum Date: Mon, 23 Jul 2018 07:06:42 +0200 Subject: [PATCH] allow null when time field is not required (#5832) * allow null when time field is not required * Update base_document.py --- frappe/model/base_document.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frappe/model/base_document.py b/frappe/model/base_document.py index ec89cdbe78..59623e9635 100644 --- a/frappe/model/base_document.py +++ b/frappe/model/base_document.py @@ -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()=="":