diff --git a/temba/utils/dates.py b/temba/utils/dates.py index cac229850b..bb70cf47cb 100644 --- a/temba/utils/dates.py +++ b/temba/utils/dates.py @@ -15,7 +15,7 @@ def datetime_to_str(date_obj, format, tz): if not date_obj: return None - if type(date_obj) == date: + if isinstance(date_obj, date): date_obj = datetime.combine(date_obj, time(0, 0, 0)).replace(tzinfo=tz) if isinstance(date_obj, datetime):