Skip to content

Commit

Permalink
Fix unique events dict get fix
Browse files Browse the repository at this point in the history
  • Loading branch information
DaymasS committed Sep 16, 2024
1 parent 28a6393 commit b654d23
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
@@ -110,9 +110,9 @@ async def create_events(
event_dict = event.model_dump()
existing_events_query = (
Event.get_all(session=db.session)
.filter(Event.name == event_dict["name"])
.filter(Event.start_ts == event_dict["start_ts"])
.filter(Event.end_ts == event_dict["end_ts"])
.filter(Event.name == event_dict.get("name"))
.filter(Event.start_ts == event_dict.get("start_ts"))
.filter(Event.end_ts == event_dict.get("end_ts"))
)
is_unique = True
for existing_event in existing_events_query.all():

0 comments on commit b654d23

Please sign in to comment.