This commit is contained in:
shijing 2023-09-06 13:13:32 +08:00
commit 22b761f644
1 changed files with 2 additions and 0 deletions

View File

@ -613,6 +613,8 @@ class ImpMixin:
new_val = datetime.datetime.strptime(val, '%Y-%m-%d').date()
except ValueError:
raise ParseError(f'{ind}行, 日期时间格式错误')
elif val is None:
pass
else:
raise ParseError(f'{ind}行, 日期时间格式错误')
return new_val