Skip to content

Commit

Permalink
Update src/icalendar/cal.py
Browse files Browse the repository at this point in the history
Co-authored-by: Steve Piercy <web@stevepiercy.com>
  • Loading branch information
niccokunzmann and stevepiercy authored Oct 11, 2024
1 parent fc92cb9 commit c7d2335
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/icalendar/cal.py
Original file line number Diff line number Diff line change
Expand Up @@ -591,7 +591,7 @@ def _get_start_end_duration(self):
if isinstance(start, date) and not isinstance(start, datetime) and duration is not None and duration.seconds != 0:
raise InvalidCalendar("When DTSTART is a date, DURATION must be of days or weeks.")
if start is not None and end is not None and is_date(start) != is_date(end):
raise InvalidCalendar("DTSTART and DTEND must have the same type.")
raise InvalidCalendar("DTSTART and DTEND must be of the same type, either date or datetime.")
return start, end, duration

@property
Expand Down

0 comments on commit c7d2335

Please sign in to comment.