Skip to content

Commit 6faec3c

Browse files
committed
add each unique content type to the dependencies collection
1 parent fd76c4b commit 6faec3c

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/Umbraco.Deploy.Contrib.Connectors/ValueConnectors/InnerContentConnector.cs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,15 @@ public string GetValue(Property property, ICollection<ArtifactDependency> depend
6767
contentType = _contentTypeService.GetContentType(innerContentItem.IcContentTypeAlias);
6868
if (contentType == null)
6969
throw new InvalidOperationException($"Could not resolve these content types for the Inner Content property with key: {innerContentItem.Key}, and name: {innerContentItem.Name}");
70+
71+
// ensure the content typ[e is added as a unique dependency
72+
var contentTypeUdi = contentType.GetUdi();
73+
var distinctContentTypes = new Dictionary<GuidUdi,IContentType>();
74+
if (distinctContentTypes.ContainsKey(contentTypeUdi) == false)
75+
{
76+
distinctContentTypes.Add(contentTypeUdi,contentType);
77+
dependencies.Add(new ArtifactDependency(contentTypeUdi,false,ArtifactDependencyMode.Match));
78+
}
7079

7180
foreach (var key in innerContentItem.PropertyValues.Keys.ToArray())
7281
{

0 commit comments

Comments
 (0)