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
This commit is contained in:
Niels Lyngsø
2025-05-19 11:37:10 +02:00
committed by GitHub
parent 8f171564b7
commit dda69a1ead

View File

@@ -714,6 +714,10 @@ export abstract class UmbContentDetailWorkspaceContextBase<
*/
public async runMandatoryValidationForSaveData(saveData: DetailModelType, variantIds: Array<UmbVariantId> = []) {
// Check that the data is valid before we save it.
// If we vary by culture then we do not want to validate the invariant variant.
if (this.getVariesByCulture()) {
variantIds = variantIds.filter((variant) => !variant.isCultureInvariant());
}
const missingVariants = variantIds.filter((variant) => {
return !saveData.variants.some((y) => variant.compare(y));
});