Skip to content

Commit

Permalink
fix: events can have same uid
Browse files Browse the repository at this point in the history
  • Loading branch information
dantetemplar committed Sep 19, 2024
1 parent 017f777 commit a81694e
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions src/modules/parse/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,17 +115,10 @@ def sluggify(s: str) -> str:


def validate_calendar(calendar: icalendar.Calendar):
unique_ids = set()
for event in calendar.walk("VEVENT"):
event: icalendar.Event
validate_vevent(event)

uid = event["UID"]
if uid in unique_ids:
raise ValueError(f"Event UID ({uid}) is not unique", event)

unique_ids.add(uid)


def validate_vevent(event: icalendar.Event):
if "UID" not in event:
Expand Down

0 comments on commit a81694e

Please sign in to comment.