Merge pull request #19 from Danakcorp/mrtz

fix : check duplicate product
This commit is contained in:
morteza-mortezai
2025-10-25 09:47:51 +03:30
committed by GitHub
@@ -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;
}