diff options
author | dixpac <dino.onex@gmail.com> | 2016-07-03 16:04:22 +0200 |
---|---|---|
committer | dixpac <dino.onex@gmail.com> | 2016-07-14 08:51:00 +0200 |
commit | e21492b810bf9cd30f0e60836c056a72e830f427 (patch) | |
tree | af13b1f7482ce738408e396c649134c7fab974f0 /lib/api/award_emoji.rb | |
parent | 7968484dfa363537e6e7822ca1ec100bcd0ec4f8 (diff) | |
download | gitlab-ce-e21492b810bf9cd30f0e60836c056a72e830f427.tar.gz |
Fix not normalized emoji paths
* There where path where +1 was stored as +1 not as thumbsup
that was causing problems such as showing thumbsup icon 2 time.
I fixed this to always normalize and store +1 as tumbsup
Diffstat (limited to 'lib/api/award_emoji.rb')
-rw-r--r-- | lib/api/award_emoji.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/api/award_emoji.rb b/lib/api/award_emoji.rb index c4fa1838b5a..2efe7e3adf3 100644 --- a/lib/api/award_emoji.rb +++ b/lib/api/award_emoji.rb @@ -56,9 +56,9 @@ module API not_found!('Award Emoji') unless can_read_awardable? - award = awardable.award_emoji.new(name: params[:name], user: current_user) + award = awardable.create_award_emoji(params[:name], current_user) - if award.save + if award.persisted? present award, with: Entities::AwardEmoji else not_found!("Award Emoji #{award.errors.messages}") |