Skip to content
This repository has been archived by the owner on Jan 3, 2025. It is now read-only.

Commit

Permalink
don't break if the competition has no waiting list
Browse files Browse the repository at this point in the history
  • Loading branch information
FinnIckler committed Nov 12, 2024
1 parent 906c0c0 commit c70225c
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions app/controllers/internal_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,11 @@ def history

def waiting_list
competition_id = params.require(:competition_id)
waiting_list = WaitingList.find(competition_id)
render json: waiting_list.entries
begin
waiting_list = WaitingList.find(competition_id)
render json: waiting_list.entries
rescue Dynamoid::Errors::RecordNotFound
return json: []
end
end
end

0 comments on commit c70225c

Please sign in to comment.