From 83da08837d912945db9fbd14422cafa6ea91b968 Mon Sep 17 00:00:00 2001 From: morteza-mortezai Date: Sat, 25 Oct 2025 09:47:26 +0330 Subject: [PATCH] fix : check duplicate product --- src/modules/product/providers/product.service.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/product/providers/product.service.ts b/src/modules/product/providers/product.service.ts index 308d029..06ea46a 100644 --- a/src/modules/product/providers/product.service.ts +++ b/src/modules/product/providers/product.service.ts @@ -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; }