diff --git a/comfyrecipes/parsing.py b/comfyrecipes/parsing.py index 65ae589..7f73140 100644 --- a/comfyrecipes/parsing.py +++ b/comfyrecipes/parsing.py @@ -564,7 +564,7 @@ class PriceDB(Element): price: float, amount: float, unit: Unit, - currency: Optional[str], + currency: str, ) -> None: super().__init__(ctx) self.price = price @@ -591,4 +591,6 @@ class PriceDB(Element): currency = ctx.settings.default_currency if "currency" in dct: currency = dct["currency"] + if currency is None: + raise RuntimeError("currency not specified and default_currency is also not set") return cls(ctx=ctx, price=price, amount=amount, unit=unit, currency=currency)