fix : check duplicate product

This commit is contained in:
morteza-mortezai
2025-10-25 09:47:26 +03:30
parent 3c941c9fe8
commit 83da08837d
@@ -1454,7 +1454,7 @@ class ProductService {
//**************************************************************
//****method to check for duplicate product
private async checkForDuplicateProduct(model: string) {
const exist = await this.productRepo.model.exists({ model });
const exist = await this.productRepo.model.exists({ model, deleted: false });
if (exist) throw new BadRequestError(ProductMessage.DuplicateName);
return true;
}