Fixes relation issue, when moving a root item to recycle bin, the "Relate Parent Media Folder On Delete"/"Relate Parent Document On Delete" cannot get the parent node type, because it is a fake root.

This commit is contained in:
Bjarke Berg
2022-06-09 09:46:42 +02:00
parent 2cc229ef9a
commit 2ab1518862

View File

@@ -20,7 +20,7 @@ namespace Umbraco.Cms.Core.Models
public string? NodeType { get; set; }
[DataMember(Name = "udi")]
public Udi NodeUdi => Udi.Create(NodeType, NodeKey);
public Udi NodeUdi => NodeType == Constants.UdiEntityType.Unknown ? null : Udi.Create(NodeType, NodeKey);
[DataMember(Name = "icon")]
public string? ContentTypeIcon { get; set; }