From 2f659f4d182604d386528ab768653f559e3cbd10 Mon Sep 17 00:00:00 2001 From: Angus McLeod Date: Tue, 7 Nov 2017 14:28:26 +0800 Subject: [PATCH] bugfix --- assets/javascripts/discourse/models/custom-wizard.js.es6 | 2 +- controllers/admin.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/assets/javascripts/discourse/models/custom-wizard.js.es6 b/assets/javascripts/discourse/models/custom-wizard.js.es6 index 1b49360e..7c5e06e3 100644 --- a/assets/javascripts/discourse/models/custom-wizard.js.es6 +++ b/assets/javascripts/discourse/models/custom-wizard.js.es6 @@ -92,7 +92,7 @@ const CustomWizard = Discourse.Model.extend({ if (f.type === 'dropdown') { const choices = f.choices; - if ((!choices || choices.length < 1) && !f.choices_key && !f.choices_categories) { + if ((!choices || choices.length < 1) && !f.choices_key && !f.choices_preset) { error = 'field.need_choices'; return; } diff --git a/controllers/admin.rb b/controllers/admin.rb index 9ae19603..57f679b3 100644 --- a/controllers/admin.rb +++ b/controllers/admin.rb @@ -55,7 +55,7 @@ class CustomWizard::AdminController < ::ApplicationController if f["type"] === 'dropdown' choices = f["choices"] - if (!choices || choices.length < 1) && !f["choices_key"] && !f["choices_categories"] + if (!choices || choices.length < 1) && !f["choices_key"] && !f["choices_preset"] error = 'field.need_choices' break end