From f1f9f9e0ec136ab495cba3820c060001f88cc09f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dar=C3=ADo=20Lodeiros?= Date: Wed, 23 Nov 2022 20:59:42 +0100 Subject: [PATCH] [FIX]pms_api_rest: fix patch discount to 0 --- pms_api_rest/services/pms_reservation_service.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pms_api_rest/services/pms_reservation_service.py b/pms_api_rest/services/pms_reservation_service.py index 9a38c4926..bed800bf0 100644 --- a/pms_api_rest/services/pms_reservation_service.py +++ b/pms_api_rest/services/pms_reservation_service.py @@ -217,11 +217,11 @@ class PmsReservationService(Component): not reservation_line or origin_data.price != reservation_line.price ): line_vals["price"] = origin_data.price - if origin_data.discount and ( + if origin_data.discount is not None and ( not reservation_line or origin_data.discount != reservation_line.discount ): line_vals["discount"] = origin_data.discount - if origin_data.cancelDiscount and ( + if origin_data.cancelDiscount is not None and ( not reservation_line or origin_data.cancelDiscount != reservation_line.cancelDiscount ):