From 66241cfc7e6a06c3759b857682505beb37f94dc5 Mon Sep 17 00:00:00 2001 From: "han@highemelry" Date: Wed, 18 Sep 2019 06:20:48 +0900 Subject: [PATCH] Fix audit log error when custom emoji is copied from remote server (#11876) --- app/models/custom_emoji.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/custom_emoji.rb b/app/models/custom_emoji.rb index edb1bec752..0dacaf654b 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