diff --git a/app/controllers/asks_controller.rb b/app/controllers/asks_controller.rb index 5ae9851..145b56f 100644 --- a/app/controllers/asks_controller.rb +++ b/app/controllers/asks_controller.rb @@ -207,7 +207,7 @@ class AsksController < ApplicationController all_to_save = [] ask_setting = AskCategorySetting.enabled.where(category_id: params['ask_question']['category_id']).first override_sort_number = nil - if ask_setting.use_default + if ask_setting && ask_setting.use_default override_sort_number = ask_setting.default_sort_number ask_setting = nil end