fix : bug create no color no size variant
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user