Commit 81888876 authored by Yoshinori Okuji's avatar Yoshinori Okuji

Do not check datetime_out_of_range if a value is empty.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@14436 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 6c9f7468
......@@ -998,11 +998,11 @@ class PatchedDateTimeValidator(DateTimeValidator):
# check if things are within range
start_datetime = field.get_value('start_datetime')
if (start_datetime is not None and
if (start_datetime not in (None, '') and
result < start_datetime):
self.raise_error('datetime_out_of_range', field)
end_datetime = field.get_value('end_datetime')
if (end_datetime is not None and
if (end_datetime not in (None, '') and
result >= end_datetime):
self.raise_error('datetime_out_of_range', field)
......
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