This commit is contained in:
BoHung Chiu 2022-09-08 11:24:20 +08:00
parent 5d444c12ba
commit 6d1b494a4a
1 changed files with 5 additions and 1 deletions

View File

@ -160,7 +160,11 @@ class AskSetting
ask_category_settings = AskCategorySetting.enabled.to_a
end
ask_category_settings.each do |c|
cat = Category.find(c.category_id)
cat = Category.find(c.category_id) rescue nil
if cat.nil?
c.destroy
next
end
c.custom_fields.each do |k,v|
trans = v["field"]
tmp_locales.each do |l|