Fix datetime combine when value is False for issue1560
This commit is contained in:
1 parent
366591390f
commit
f75243f237
1 file changed
+4
-1
@@ -230,7 +230,10 @@ class Work(ModelSQL, ModelView):
|
||||
for fun_field, db_field in zip(fun_fields, db_fields):
|
||||
if fun_field == name:
|
||||
self.write(cursor, user, ids, {
|
||||
db_field: datetime.datetime.combine(value, datetime.time()),
|
||||
db_field: value \
|
||||
and datetime.datetime.combine(value,
|
||||
datetime.time()) \
|
||||
or False,
|
||||
}, context=context)
|
||||
break
|
||||
|
||||
|
||||
Reference in new issue
Block a user