diff --git a/hantec_api_ecommerce/controllers/main.py b/hantec_api_ecommerce/controllers/main.py index 80cc012..5d8ad45 100644 --- a/hantec_api_ecommerce/controllers/main.py +++ b/hantec_api_ecommerce/controllers/main.py @@ -149,9 +149,7 @@ def create_address(self): [("parent_id", "=", partner_id), ("type", "=", address_type)], limit=1 ) - if only_create: - address = False - if address: + if address and not only_create: # Update existing address address.write(address_data) else: