FIX: Only save custom fields when unassigning a topic.

This commit is contained in:
Guo Xiang Tan 2018-07-26 08:57:24 +08:00
parent 949ccb07ca
commit 6e7f01e5d4
1 changed files with 1 additions and 1 deletions

View File

@ -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?