From bd3324cca2fefb00e421c4dc1fb276db540d08bd Mon Sep 17 00:00:00 2001 From: "Z.J. van de Weg" Date: Fri, 10 Jun 2016 12:43:11 +0200 Subject: Skip system notes from receiving award emoji --- db/fixtures/development/15_award_emoji.rb | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'db') diff --git a/db/fixtures/development/15_award_emoji.rb b/db/fixtures/development/15_award_emoji.rb index 3ac3fea43a5..e195da931ed 100644 --- a/db/fixtures/development/15_award_emoji.rb +++ b/db/fixtures/development/15_award_emoji.rb @@ -7,8 +7,11 @@ Gitlab::Seeder.quiet do project.team.users.sample(2) do |user| issue.create_award_emoji(emoji.sample, user) - note = issue.notes.sample - note.create_award_emoji(emoji.sample, user) + issue.notes.sample(2).each do |note| + next if note.system? + note.create_award_emoji(emoji.sample, user) + end + print '.' end end @@ -19,8 +22,11 @@ Gitlab::Seeder.quiet do project.team.users.sample(2).each do |user| mr.create_award_emoji(emoji.sample, user) - note = mr.notes.sample - note.create_award_emoji(emoji.sample, user) + mr.notes.sample(2).each do |note| + next if note.system? + note.create_award_emoji(emoji.sample, user) + end + print '.' end end -- cgit v1.2.1