From: han@highemelry Date: Tue, 17 Sep 2019 21:20:48 +0000 (+0900) Subject: Fix audit log error when custom emoji is copied from remote server (#11876) X-Git-Url: https://git.xn--scling-oua.cat.family/?a=commitdiff_plain;h=3919571c3958f7808a7830b7d19d1605fc7c0ef9;p=mastodon.git Fix audit log error when custom emoji is copied from remote server (#11876) --- 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