mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-24 01:49:12 +08:00
TaxonomyField was running Update when it should not (#7877)
This commit is contained in:

committed by
Sébastien Ros

parent
521087d489
commit
d6fa50aaee
@@ -98,11 +98,11 @@ namespace Orchard.Taxonomies.Handlers {
|
||||
|
||||
protected override void UpdateEditorShape(UpdateEditorContext context) {
|
||||
// case contentitem without localization and taxonomyfield localized
|
||||
if (context.ContentItem.As<LocalizationPart>() != null) {
|
||||
if (context.ContentItem.As<LocalizationPart>() == null) {
|
||||
return;
|
||||
}
|
||||
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;
|
||||
}
|
||||
base.UpdateEditorShape(context);
|
||||
@@ -134,4 +134,4 @@ namespace Orchard.Taxonomies.Handlers {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user