diff --git a/frappe/utils/data.py b/frappe/utils/data.py index 39c8c387eb..dc4d3c5e53 100644 --- a/frappe/utils/data.py +++ b/frappe/utils/data.py @@ -54,8 +54,8 @@ def get_datetime(datetime_str=None): elif isinstance(datetime_str, datetime.date): return datetime.datetime.combine(datetime_str, datetime.time()) - # dateutil parser does not agree with dates like 0001-01-01 - if not datetime_str or (datetime_str or "").startswith("0001-01-01"): + # dateutil parser does not agree with dates like "0001-01-01" or "0000-00-00" + if not datetime_str or (datetime_str or "").startswith(("0001-01-01", "0000-00-00")): return None try: