diff --git a/product/Formulator/Widget.py b/product/Formulator/Widget.py index e9757b4d39a8c795f6d4dc7802a791b7724b368b..2fcc9016c5b77b471f2e883e9e4e44c70cdb9883 100644 --- a/product/Formulator/Widget.py +++ b/product/Formulator/Widget.py @@ -1485,8 +1485,10 @@ class DateTimeWidget(Widget): # Is it still usefull to test the None value, # as DateTimeField should be considerer as the other field # and get an empty string as default value? - if value in (None, ''): - return '' + if not isinstance(value, DateTime): + if value is None: + value = '' + return value use_ampm = field.get_value('ampm_time_style') use_timezone = field.get_value('timezone_style')