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

Commit c70225c

Browse files
committed
don't break if the competition has no waiting list
1 parent 906c0c0 commit c70225c

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

app/controllers/internal_controller.rb

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,11 @@ def history
124124

125125
def waiting_list
126126
competition_id = params.require(:competition_id)
127-
waiting_list = WaitingList.find(competition_id)
128-
render json: waiting_list.entries
127+
begin
128+
waiting_list = WaitingList.find(competition_id)
129+
render json: waiting_list.entries
130+
rescue Dynamoid::Errors::RecordNotFound
131+
return json: []
132+
end
129133
end
130134
end

0 commit comments

Comments
 (0)