mirror of
				https://github.com/discourse/discourse.git
				synced 2025-02-25 18:55:32 -06:00 
			
		
		
		
	FIX: Do not error when importing a theme with empty files
This commit is contained in:
		@@ -149,7 +149,7 @@ class RemoteTheme < ActiveRecord::Base
 | 
			
		||||
    end
 | 
			
		||||
 | 
			
		||||
    # Destroy fields that no longer exist in the remote theme
 | 
			
		||||
    field_ids_to_destroy = theme.theme_fields.pluck(:id) - updated_fields.map(&:id)
 | 
			
		||||
    field_ids_to_destroy = theme.theme_fields.pluck(:id) - updated_fields.map { |tf| tf&.id }
 | 
			
		||||
    ThemeField.where(id: field_ids_to_destroy).destroy_all
 | 
			
		||||
 | 
			
		||||
    if !skip_update
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user