Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-05-28 18:08:02 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-05-28 18:08:02 +0300
commit1f1e53f43f87cada9b515571cc973e9eadcbc4e4 (patch)
treed9bca1bda729b495601634947665f11279b5d6cf /app/finders
parenta83a97f60432c6c352af80d55339e9fe45b63307 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/finders')
-rw-r--r--app/finders/events_finder.rb5
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