Angus McLeod 7 anos atrás
pai
commit
2f659f4d18

+ 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