Skip to content

Commit

Permalink
Fix unique events list comp fix
Browse files Browse the repository at this point in the history
  • Loading branch information
DaymasS committed Sep 16, 2024
1 parent 8f3d494 commit 28a6393
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions calendar_backend/routes/event/event.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,9 +117,9 @@ async def create_events(
is_unique = True
for existing_event in existing_events_query.all():
if (
[column.id for column in existing_event.group] == event_dict["group_id"]
and [column.id for column in existing_event.room] == event_dict["room_id"]
and [column.id for column in existing_event.lecturer] == event_dict["lecturer_id"]
{column.id for column in existing_event.group} == set(event_dict["group_id"])
and {column.id for column in existing_event.room} == set(event_dict["room_id"])
and {column.id for column in existing_event.lecturer} == set(event_dict["lecturer_id"])
):
is_unique = False
if is_unique:
Expand Down

0 comments on commit 28a6393

Please sign in to comment.