From 10b6b504a70178740f59af9adc58f201ba66d928 Mon Sep 17 00:00:00 2001 From: Yukihiko Shinoda Date: Tue, 16 Jan 2024 01:29:05 +0900 Subject: [PATCH] Fix bug that error occur when process shipping and handling in Amazon --- .../datasources/csv/data/amazon_201911.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/zaimcsvconverter/inputtooutput/datasources/csv/data/amazon_201911.py b/zaimcsvconverter/inputtooutput/datasources/csv/data/amazon_201911.py index e479b1c..0cb2b9a 100644 --- a/zaimcsvconverter/inputtooutput/datasources/csv/data/amazon_201911.py +++ b/zaimcsvconverter/inputtooutput/datasources/csv/data/amazon_201911.py @@ -67,9 +67,7 @@ def ensures_not_payment(self) -> bool: @property def ensures_not_credit_card(self) -> bool: - return ( - not self.credit_card_billing_date and not self.credit_card_billing_amount and not self.credit_card_identity - ) + return not self.credit_card_billing_date and not self.credit_card_billing_amount @property def is_discount(self) -> bool: @@ -93,7 +91,12 @@ def is_payment(self) -> bool: @property def is_free_kindle(self) -> bool: - return self.is_digital_order and self.price == 0 and self.ensures_not_credit_card + return ( + self.is_digital_order + and self.price == 0 + and self.ensures_not_credit_card + and not self.credit_card_identity + ) @property def is_digital_order(self) -> bool: