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) {