fix error
This commit is contained in:
		
							parent
							
								
									df3f0a70a4
								
							
						
					
					
						commit
						d6593427f3
					
				| 
						 | 
				
			
			@ -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
 | 
			
		||||
  
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue