Fix import

This commit is contained in:
Jean-Marie Favreau 2024-11-27 11:38:53 +01:00
parent f9678bbf81
commit ac8ddc5123

View File

@ -690,8 +690,8 @@ class Event(models.Model):
end_day = self.get_consolidated_end_day(False)
if end_day != self.start_day and self.end_time and self.end_time < time(8):
if isinstance(end_day, str):
end_day = date.fromisoformat(str(end_day))
return parse_date(end_day) + timedelta(days=-1)
end_day = parse_date(end_day)
return end_day + timedelta(days=-1)
else:
return end_day
else: