Default France value and cleaner handling of BillingInfo creation

This commit is contained in:
2025-04-11 15:30:05 +02:00
parent 5c2f324e13
commit 4ce885ac6b
6 changed files with 27 additions and 11 deletions

View File

@ -51,7 +51,9 @@ class BillingInfoState(Enum):
MISSING_PHONE_NUMBER = 3
@classmethod
def from_model(cls, info: BillingInfo) -> BillingInfoState:
def from_model(cls, info: BillingInfo | None) -> BillingInfoState:
if info is None:
return cls.EMPTY
for attr in [
"first_name",
"last_name",