Fix custom emoji copy not copying file (#5298)
This commit is contained in:
		
							parent
							
								
									4bb3e4eeba
								
							
						
					
					
						commit
						61d3ecc805
					
				
					 1 changed files with 1 additions and 2 deletions
				
			
		| 
						 | 
				
			
			@ -28,8 +28,7 @@ module Admin
 | 
			
		|||
    end
 | 
			
		||||
 | 
			
		||||
    def copy
 | 
			
		||||
      emoji = @custom_emoji.dup
 | 
			
		||||
      emoji.domain = nil
 | 
			
		||||
      emoji = CustomEmoji.new(domain: nil, shortcode: @custom_emoji.shortcode, image: @custom_emoji.image)
 | 
			
		||||
 | 
			
		||||
      if emoji.save
 | 
			
		||||
        redirect_to admin_custom_emojis_path, notice: I18n.t('admin.custom_emojis.copied_msg')
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		
		Reference in a new issue