about summary refs log tree commit diff
path: root/app/models
diff options
context:
space:
mode:
authorhan@highemelry <high.emerly.ytfin@gmail.com>2019-09-18 06:20:48 +0900
committerEugen Rochko <eugen@zeonfederated.com>2019-09-17 23:20:48 +0200
commit3919571c3958f7808a7830b7d19d1605fc7c0ef9 (patch)
treebfa87aef8aa3a07b47bc59c3b055e9b3ac0fe8ad /app/models
parent75c6ad500d7038b96f4942d0297a15b85152f3a0 (diff)
Fix audit log error when custom emoji is copied from remote server (#11876)
Diffstat (limited to 'app/models')
-rw-r--r--app/models/custom_emoji.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/custom_emoji.rb b/app/models/custom_emoji.rb
index edb1bec75..0dacaf654 100644
--- a/app/models/custom_emoji.rb
+++ b/app/models/custom_emoji.rb
@@ -63,7 +63,7 @@ class CustomEmoji < ApplicationRecord
   def copy!
     copy = self.class.find_or_initialize_by(domain: nil, shortcode: shortcode)
     copy.image = image
-    copy.save!
+    copy.tap(&:save!)
   end
 
   class << self