summaryrefslogtreecommitdiff
path: root/app/models/note.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/models/note.rb')
-rw-r--r--app/models/note.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/app/models/note.rb b/app/models/note.rb
index 55255d22c2f..b3809ad81e0 100644
--- a/app/models/note.rb
+++ b/app/models/note.rb
@@ -375,6 +375,7 @@ class Note < ActiveRecord::Base
#
def set_award!
return unless awards_supported? && contains_emoji_only?
+
self.is_award = true
self.note = award_emoji_name
end
@@ -382,7 +383,7 @@ class Note < ActiveRecord::Base
private
def awards_supported?
- noteable.kind_of?(Issue) || noteable.is_a?(MergeRequest)
+ (noteable.kind_of?(Issue) || noteable.is_a?(MergeRequest)) && !for_diff_line?
end
def contains_emoji_only?