Skip to content

Commit

Permalink
Bugfix #14
Browse files Browse the repository at this point in the history
  • Loading branch information
heming-langrenn committed Jul 29, 2023
1 parent 3200516 commit 38b5218
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions photo_service/views/video_events.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,12 @@ class VideoEventsView(View):
async def get(self) -> Response:
"""Get route function."""
db = self.request.app["db"]
event_id = self.request.match_info["eventId"]
try:
event_id = self.request.rel_url.query["eventId"]
except Exception as e:
raise HTTPBadRequest(
reason="Mandatory param is missing - eventId."
) from e

# get all video_events
video_events = await VideoEventsAdapter.get_all_video_events(db, event_id)
Expand All @@ -46,7 +51,7 @@ async def post(self) -> Response:
raise e from e

try:
event_id = self.request.match_info["eventId"]
event_id = self.request.rel_url.query["eventId"]
queue_name = self.request.rel_url.query["queueName"]
except Exception as e:
raise HTTPBadRequest(
Expand Down

0 comments on commit 38b5218

Please sign in to comment.