uselotus / lotus

Open Source Pricing & Packaging Infrastructure
https://www.uselotus.io
MIT License
1.73k stars 126 forks source link

Fixes #786: error creating new customer when address provided #787

Closed vaddenz closed 9 months ago

vaddenz commented 9 months ago

When creating new customer with address specified, server raises an exception saying:

ValueError: Cannot assign "(<Address: Address: 10 Rue de la Paix, Paris, Île-de-France, 75002, FR>, False)": "Customer.billing_address" must be a "Address" instance

(Described in issue #786)

The exception occurs when fetching/creating address record, get_or_create() method returns a tuple and its first element is the model object we expected.