Skip to content

Commit 282af37

Browse files
committed
Merge remote-tracking branch 'Stash/release/2.2' into release/2.2
2 parents 9d48fa1 + 4d015f3 commit 282af37

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

Sdl.Web.Tridion.Templates.R2/Data/DefaultModelBuilder.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -516,6 +516,11 @@ private EntityModelData GetEntityModelData(ComponentPresentation cp)
516516
Id = $"{GetDxaIdentifier(cp.Component)}-{GetDxaIdentifier(ct)}",
517517
Namespace = GetNamespace(cp.Component)
518518
};
519+
520+
// This property is internal so have to set it via reflection. This prevents the
521+
// publishing package containing an empty DCP
522+
childRenderedItem.GetType().GetProperty("IsRenderedCompletely")
523+
.SetValue(childRenderedItem, false, null);
519524
}
520525
else
521526
{

Sdl.Web.Tridion.Templates.Tests/DataModelBuilderPipelineTest.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,8 @@ public void CreatePageModel_WithTargetGroupConditions_Success() // See TSI-2844
131131
Condition[] targetGroupConditions = targetGroupConditionsValue as Condition[];
132132
Assert.IsNotNull(targetGroupConditions, "targetGroupConditions");
133133
Assert.AreEqual(1, targetGroupConditions.Length, "targetGroupConditions.Length");
134-
TrackingKeyCondition trackingKeyCondition = targetGroupConditions[0] as TrackingKeyCondition;
134+
TargetGroupCondition targetGroupCondition = targetGroupConditions[0] as TargetGroupCondition;
135+
TrackingKeyCondition trackingKeyCondition = targetGroupCondition.TargetGroup.Conditions[0] as TrackingKeyCondition;
135136
Assert.IsNotNull(trackingKeyCondition, "trackingKeyCondition");
136137
Assert.AreEqual("Test Keyword 2", trackingKeyCondition.TrackingKeyTitle, "trackingKeyCondition.TrackingKeyTitle");
137138
Assert.AreEqual(ConditionOperator.Equals, trackingKeyCondition.Operator, "trackingKeyCondition.Operator");

0 commit comments

Comments
 (0)