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}
|
||||
need_recalc_sort = true
|
||||
end
|
||||
if need_recalc_sort
|
||||
# if need_recalc_sort
|
||||
self.recalc_sort(false)
|
||||
end
|
||||
# end
|
||||
end
|
||||
true
|
||||
end
|
||||
|
|
|
@ -22,9 +22,9 @@ class AskSetting
|
|||
self.custom_fields = self.custom_fields.select{|k,v| v['delete'] != true}
|
||||
need_recalc_sort = true
|
||||
end
|
||||
if need_recalc_sort
|
||||
# if need_recalc_sort
|
||||
self.recalc_sort(false)
|
||||
end
|
||||
# end
|
||||
true
|
||||
end
|
||||
after_save do
|
||||
|
|
|
@ -6,7 +6,7 @@ Rails.application.routes.draw do
|
|||
s = OrbitHelper::SharedHash['current_site']['site'] rescue Site.first
|
||||
update_flag = s.respond_to?(:tmp_flags)
|
||||
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
|
||||
ask_setting = AskSetting.first
|
||||
check_custom_fields = {}
|
||||
|
@ -52,7 +52,7 @@ Rails.application.routes.draw do
|
|||
a.migrate_old
|
||||
end
|
||||
if update_flag
|
||||
Site.update_all("$push"=>{"tmp_flags"=>'askf2'})
|
||||
Site.update_all("$push"=>{"tmp_flags"=>'askf3'})
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue