Skip to content

Commit ee155c9

Browse files
committed
use unscoped find in controller
1 parent d4f6d24 commit ee155c9

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

app/controllers/community_custom_fields/custom_fields_controller.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ class CommunityCustomFields::CustomFieldsController < ::ApplicationController
77
before_action :ensure_admin
88

99
def update
10-
topic = Topic.find(params[:topic_id])
10+
topic = Topic.unscoped.find(params[:topic_id])
1111
topic.custom_fields.merge!(custom_fields_params)
1212
if topic.save_custom_fields
1313
topic.touch

plugin.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,7 @@ module ::CommunityCustomFields
112112
topic.custom_fields[:assignee_id] = topic.custom_fields[:last_assigned_to_id]
113113
topic.custom_fields[:last_assigned_at] = Time.current.iso8601
114114
end
115+
115116
topic.custom_fields[:outcome] = nil
116117
topic.custom_fields[:closed_at] = nil
117118
end

0 commit comments

Comments
 (0)