From 3919571c3958f7808a7830b7d19d1605fc7c0ef9 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