diff options
Diffstat (limited to 'lib/api/snippets.rb')
-rw-r--r-- | lib/api/snippets.rb | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/api/snippets.rb b/lib/api/snippets.rb index db4e0b0b013..fd634037a77 100644 --- a/lib/api/snippets.rb +++ b/lib/api/snippets.rb @@ -150,9 +150,8 @@ module API get ":id/user_agent_detail" do authenticated_as_admin! - snippet = Snippet.find_by(id: params[:id]) + snippet = Snippet.find_by!(id: params[:id]) - return not_found!('Snippet') unless snippet return not_found!('UserAgentDetail') unless snippet.user_agent_detail present snippet.user_agent_detail, with: Entities::UserAgentDetail |