mirror of
				https://github.com/OrchardCMS/Orchard.git
				synced 2025-10-25 10:59:18 +08:00 
			
		
		
		
	TaxonomyField was running Update when it should not (#7877)
This commit is contained in:
		 Matteo Piovanelli
					Matteo Piovanelli
				
			
				
					committed by
					
						 Sébastien Ros
						Sébastien Ros
					
				
			
			
				
	
			
			
			 Sébastien Ros
						Sébastien Ros
					
				
			
						parent
						
							521087d489
						
					
				
				
					commit
					d6fa50aaee
				
			| @@ -98,11 +98,11 @@ namespace Orchard.Taxonomies.Handlers { | |||||||
|  |  | ||||||
|         protected override void UpdateEditorShape(UpdateEditorContext context) { |         protected override void UpdateEditorShape(UpdateEditorContext context) { | ||||||
|             // case contentitem without localization and taxonomyfield localized |             // case contentitem without localization and taxonomyfield localized | ||||||
|             if (context.ContentItem.As<LocalizationPart>() != null) { |             if (context.ContentItem.As<LocalizationPart>() == null) { | ||||||
|                 return; |                 return; | ||||||
|             } |             } | ||||||
|             var partFieldDefinitions = context.ContentItem.Parts.SelectMany(p => p.PartDefinition.Fields).Where(x => x.FieldDefinition.Name == "TaxonomyField"); |             var partFieldDefinitions = context.ContentItem.Parts.SelectMany(p => p.PartDefinition.Fields).Where(x => x.FieldDefinition.Name == "TaxonomyField"); | ||||||
|             if (partFieldDefinitions == null) { |             if (partFieldDefinitions == null || !partFieldDefinitions.Any()) { | ||||||
|                 return; |                 return; | ||||||
|             } |             } | ||||||
|             base.UpdateEditorShape(context); |             base.UpdateEditorShape(context); | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user