temp fix
This commit is contained in:
parent
4ac9278f56
commit
c3973df78c
|
@ -20,9 +20,9 @@ class AskCategorySetting
|
||||||
self.custom_fields = self.custom_fields.select{|k,v| v['delete'] != true}
|
self.custom_fields = self.custom_fields.select{|k,v| v['delete'] != true}
|
||||||
need_recalc_sort = true
|
need_recalc_sort = true
|
||||||
end
|
end
|
||||||
if need_recalc_sort
|
# if need_recalc_sort
|
||||||
self.recalc_sort(false)
|
self.recalc_sort(false)
|
||||||
end
|
# end
|
||||||
end
|
end
|
||||||
true
|
true
|
||||||
end
|
end
|
||||||
|
|
|
@ -22,9 +22,9 @@ class AskSetting
|
||||||
self.custom_fields = self.custom_fields.select{|k,v| v['delete'] != true}
|
self.custom_fields = self.custom_fields.select{|k,v| v['delete'] != true}
|
||||||
need_recalc_sort = true
|
need_recalc_sort = true
|
||||||
end
|
end
|
||||||
if need_recalc_sort
|
# if need_recalc_sort
|
||||||
self.recalc_sort(false)
|
self.recalc_sort(false)
|
||||||
end
|
# end
|
||||||
true
|
true
|
||||||
end
|
end
|
||||||
after_save do
|
after_save do
|
||||||
|
|
|
@ -6,7 +6,7 @@ Rails.application.routes.draw do
|
||||||
s = OrbitHelper::SharedHash['current_site']['site'] rescue Site.first
|
s = OrbitHelper::SharedHash['current_site']['site'] rescue Site.first
|
||||||
update_flag = s.respond_to?(:tmp_flags)
|
update_flag = s.respond_to?(:tmp_flags)
|
||||||
need_update = !update_flag || !(s.tmp_flags.include?('askf1'))
|
need_update = !update_flag || !(s.tmp_flags.include?('askf1'))
|
||||||
need_update2 = !update_flag || !(s.tmp_flags.include?('askf2'))
|
need_update2 = !update_flag || !(s.tmp_flags.include?('askf3'))
|
||||||
if need_update
|
if need_update
|
||||||
ask_setting = AskSetting.first
|
ask_setting = AskSetting.first
|
||||||
check_custom_fields = {}
|
check_custom_fields = {}
|
||||||
|
@ -52,7 +52,7 @@ Rails.application.routes.draw do
|
||||||
a.migrate_old
|
a.migrate_old
|
||||||
end
|
end
|
||||||
if update_flag
|
if update_flag
|
||||||
Site.update_all("$push"=>{"tmp_flags"=>'askf2'})
|
Site.update_all("$push"=>{"tmp_flags"=>'askf3'})
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue