diff options
Diffstat (limited to 'app/models/event.rb')
-rw-r--r-- | app/models/event.rb | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/app/models/event.rb b/app/models/event.rb index f6174589a84..409bc66c66c 100644 --- a/app/models/event.rb +++ b/app/models/event.rb @@ -130,10 +130,11 @@ class Event < ApplicationRecord # Update Gitlab::ContributionsCalendar#activity_dates if this changes def contributions - where("action = ? OR (target_type IN (?) AND action IN (?)) OR (target_type = ? AND action = ?)", - actions[:pushed], - %w(MergeRequest Issue), [actions[:created], actions[:closed], actions[:merged]], - "Note", actions[:commented]) + where( + 'action IN (?) OR (target_type IN (?) AND action IN (?))', + [actions[:pushed], actions[:commented]], + %w(MergeRequest Issue), [actions[:created], actions[:closed], actions[:merged]] + ) end def limit_recent(limit = 20, offset = nil) |