Skip to content

Commit

Permalink
fix: add new Price.discount_type field
Browse files Browse the repository at this point in the history
  • Loading branch information
raphodn committed Feb 20, 2025
1 parent 061566c commit 778ebd7
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions openfoodfacts_exports/exports/parquet/price.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ class PriceModel(BaseModel):
price: Decimal | None = None
price_is_discounted: bool | None = None
price_without_discount: Decimal | None = None
discount_type: str | None = None
price_per: str | None = None
currency: str | None = None
location_osm_id: int | None = None
Expand Down Expand Up @@ -108,6 +109,7 @@ def serialize_owner(self, owner: str | None, _info) -> str | None:
pa.field("price", pa.decimal128(10, 2), nullable=True),
pa.field("price_is_discounted", pa.bool_(), nullable=True),
pa.field("price_without_discount", pa.decimal128(10, 2), nullable=True),
pa.field("discount_type", pa.string(), nullable=True),
pa.field("price_per", pa.string(), nullable=True),
pa.field("currency", pa.string(), nullable=True),
pa.field("location_osm_id", pa.int64(), nullable=True),
Expand Down

0 comments on commit 778ebd7

Please sign in to comment.