Skip to content

Commit 245b774

Browse files
fix: adjust error prune into controller
1 parent c18ed8e commit 245b774

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

app/controllers/api/v1/scrims/opponent_teams_controller.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ def destroy
114114
# Read operations (index/show) are allowed for all teams to enable discovery.
115115
#
116116
def set_opponent_team
117-
id = Integer(params[:id]) rescue nil
117+
id = Integer(params[:id], exception: false)
118118
return render json: { error: 'Opponent team not found' }, status: :not_found unless id
119119

120120
@opponent_team = OpponentTeam.find_by(id: id)

0 commit comments

Comments
 (0)