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:
@@ -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));
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user