fix : bug create no color no size variant

This commit is contained in:
morteza-mortezai
2025-10-26 12:39:29 +03:30
parent 1ad879f930
commit b955f89be0
@@ -1614,8 +1614,9 @@ class ProductService {
if (categoryTheme !== CategoryThemeEnum.No_color_No_sized) return true;
const variantCount = product.variants.length;
if (variantCount && variantCount === 0) return true;
console.log("variantCount", variantCount);
if (!variantCount) return true;
console.log("pro", product, categoryTheme);
throw new BadRequestError(ProductMessage.ProductWithNoVariantCategoryTheme);
}