diff --git a/themis/importexport/utils.py b/themis/importexport/utils.py index db9e7ba..6091b7d 100644 --- a/themis/importexport/utils.py +++ b/themis/importexport/utils.py @@ -113,7 +113,10 @@ class UtilityView(BrowserView): def convert(value, attr=None, context=None): if isinstance(value, datetime.date): - value = value.strftime('%Y-%m-%d') + try: + value = value.strftime('%Y-%m-%d') + except ValueError: + value = None elif isinstance(value, datetime.datetime): value = value.strftime('%Y-%m-%d %H:%M:%S') elif isinstance(value, plone.namedfile.file.NamedBlobFile) or \