Angus McLeod 7 年之前
父節點
當前提交
2f659f4d18
共有 2 個文件被更改,包括 2 次插入2 次删除
  1. 1 1
      assets/javascripts/discourse/models/custom-wizard.js.es6
  2. 1 1
      controllers/admin.rb

+ 1 - 1
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;
             }

+ 1 - 1
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