Skip to content

Commit dda69a1

Browse files
authored
Hotfix: do not validate the invariant-variant entry when we vary by culture (#19326)
do not validate the variant entry when we vary by culture
1 parent 8f17156 commit dda69a1

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/Umbraco.Web.UI.Client/src/packages/content/content/workspace/content-detail-workspace-base.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -714,6 +714,10 @@ export abstract class UmbContentDetailWorkspaceContextBase<
714714
*/
715715
public async runMandatoryValidationForSaveData(saveData: DetailModelType, variantIds: Array<UmbVariantId> = []) {
716716
// Check that the data is valid before we save it.
717+
// If we vary by culture then we do not want to validate the invariant variant.
718+
if (this.getVariesByCulture()) {
719+
variantIds = variantIds.filter((variant) => !variant.isCultureInvariant());
720+
}
717721
const missingVariants = variantIds.filter((variant) => {
718722
return !saveData.variants.some((y) => variant.compare(y));
719723
});

0 commit comments

Comments
 (0)