From a5af0b109db49a6b5ad8e0a22f833f1bc8d1e3fc Mon Sep 17 00:00:00 2001 From: jumagura Date: Mon, 2 Oct 2023 23:38:01 -0400 Subject: [PATCH] DEV: Manage edge case not custom fields --- plugin.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugin.rb b/plugin.rb index a312209c..3a84371b 100644 --- a/plugin.rb +++ b/plugin.rb @@ -239,7 +239,7 @@ after_initialize do on(:before_create_topic) do |topic_params, user| category = topic_params.category - wizard_submission_id = topic_params.custom_fields['wizard_submission_id'] + wizard_submission_id = topic_params.custom_fields&.[]('wizard_submission_id') if category&.custom_fields&.[]('create_topic_wizard').present? && wizard_submission_id.blank? raise Discourse::InvalidParameters.new( I18n.t('wizard.error_messages.wizard_replacing_composer')