From 6e7f01e5d49b6733754b6c2f87ab262bb6582025 Mon Sep 17 00:00:00 2001 From: Guo Xiang Tan Date: Thu, 26 Jul 2018 08:57:24 +0800 Subject: [PATCH] FIX: Only save custom fields when unassigning a topic. --- lib/topic_assigner.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/topic_assigner.rb b/lib/topic_assigner.rb index 3748ac9..b172b89 100644 --- a/lib/topic_assigner.rb +++ b/lib/topic_assigner.rb @@ -194,7 +194,7 @@ SQL if assigned_to_id = @topic.custom_fields["assigned_to_id"] @topic.custom_fields["assigned_to_id"] = nil @topic.custom_fields["assigned_by_id"] = nil - @topic.save! + @topic.save_custom_fields post = @topic.posts.where(post_number: 1).first return unless post.present?