diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-04-20 21:38:24 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-04-20 21:38:24 +0300 |
commit | 983a0bba5d2a042c4a3bbb22432ec192c7501d82 (patch) | |
tree | b153cd387c14ba23bd5a07514c7c01fddf6a78a0 /lib/api/services.rb | |
parent | a2bddee2cdb38673df0e004d5b32d9f77797de64 (diff) |
Add latest changes from gitlab-org/gitlab@12-10-stable-ee
Diffstat (limited to 'lib/api/services.rb')
-rw-r--r-- | lib/api/services.rb | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/lib/api/services.rb b/lib/api/services.rb index a3b5d2cc4b7..5fd5c6bd9b0 100644 --- a/lib/api/services.rb +++ b/lib/api/services.rb @@ -130,13 +130,11 @@ module API TRIGGER_SERVICES.each do |service_slug, settings| helpers do - # rubocop: disable CodeReuse/ActiveRecord def slash_command_service(project, service_slug, params) - project.services.active.where(template: false).find do |service| + project.services.active.find do |service| service.try(:token) == params[:token] && service.to_param == service_slug.underscore end end - # rubocop: enable CodeReuse/ActiveRecord end params do |