summaryrefslogtreecommitdiff
path: root/lib/api/snippets.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/api/snippets.rb')
-rw-r--r--lib/api/snippets.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/api/snippets.rb b/lib/api/snippets.rb
index aa122c13e0c..496532a15b2 100644
--- a/lib/api/snippets.rb
+++ b/lib/api/snippets.rb
@@ -200,7 +200,7 @@ module API
get ":id/user_agent_detail" do
authenticated_as_admin!
- snippet = Snippet.find_by_id!(params[:id])
+ snippet = Snippet.find(params[:id])
break not_found!('UserAgentDetail') unless snippet.user_agent_detail