diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-05-28 18:08:02 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-05-28 18:08:02 +0300 |
commit | 1f1e53f43f87cada9b515571cc973e9eadcbc4e4 (patch) | |
tree | d9bca1bda729b495601634947665f11279b5d6cf /app/finders | |
parent | a83a97f60432c6c352af80d55339e9fe45b63307 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/finders')
-rw-r--r-- | app/finders/events_finder.rb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/app/finders/events_finder.rb b/app/finders/events_finder.rb index 9c56451fd44..52612f1f8aa 100644 --- a/app/finders/events_finder.rb +++ b/app/finders/events_finder.rb @@ -72,9 +72,10 @@ class EventsFinder # rubocop: disable CodeReuse/ActiveRecord def by_action(events) - return events unless Event::ACTIONS[params[:action]] + safe_action = Event.actions[params[:action]] + return events unless safe_action - events.where(action: Event::ACTIONS[params[:action]]) + events.where(action: safe_action) end # rubocop: enable CodeReuse/ActiveRecord |