Fix bug.
This commit is contained in:
parent
5d444c12ba
commit
6d1b494a4a
|
@ -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|
|
||||
|
|
Loading…
Reference in New Issue