From 72c93e637cb59f5af8b881ee36956d91f42e7a24 Mon Sep 17 00:00:00 2001 From: morteza-mortezai Date: Sun, 23 Nov 2025 16:56:41 +0330 Subject: [PATCH] update restuarant shipment --- .../providers/restaurant-shipment-method.service.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/modules/restaurants/providers/restaurant-shipment-method.service.ts b/src/modules/restaurants/providers/restaurant-shipment-method.service.ts index 716171a..532693a 100644 --- a/src/modules/restaurants/providers/restaurant-shipment-method.service.ts +++ b/src/modules/restaurants/providers/restaurant-shipment-method.service.ts @@ -115,7 +115,8 @@ export class RestaurantShipmentMethodService { // Check if the new relationship already exists const existing = await this.restaurantShipmentMethodRepository.findOne({ restaurant: { id: restId }, - shipmentMethod: { id: { $ne: restaurantShipmentMethodId } }, + shipmentMethod: { id: updateDto.shipmentMethodId }, + id: { $ne: restaurantShipmentMethodId }, }); if (existing) {