fix error

This commit is contained in:
邱博亞 2022-03-29 16:41:21 +08:00
parent df3f0a70a4
commit d6593427f3
2 changed files with 3 additions and 2 deletions

View File

@ -19,6 +19,7 @@ class Admin::AnnouncementsController < OrbitAdminController
ids.each_with_index do |id,i|
Bulletin.where(id: id).update(sort_number: i)
end
AnnsCache.all.delete
edit_sort
render 'update_sort',layout: false

View File

@ -8,7 +8,7 @@ module BulletinModel
end
def do_before_save
if self.class == SubPart
AnnsCache.where(parent_id: self.id).destroy
AnnsCache.where(parent_id: self.id).delete
elsif self.class == Bulletin || (self.class == Page && self.module == "announcement")
if self.class == Bulletin
tmp_tag_ids = (Array(self.tag_ids) + Array(self.org_tag_ids)).uniq
@ -19,7 +19,7 @@ module BulletinModel
end
end
end
AnnsCache.all.destroy
AnnsCache.all.delete
end
end
end