Skip to content
This repository has been archived by the owner on Apr 23, 2024. It is now read-only.

Commit

Permalink
Convert empty value to None for qu_factor_purchase_to_stock (#257)
Browse files Browse the repository at this point in the history
  • Loading branch information
marcelvriend authored Dec 24, 2022
1 parent fbfdfbd commit 2ef301d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pygrocy/grocy_api_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ class ProductData(BaseModel):
product_group_id: Optional[int] = None
qu_id_stock: int
qu_id_purchase: int
qu_factor_purchase_to_stock: float
qu_factor_purchase_to_stock: Optional[float] = None
picture_file_name: Optional[str] = None
allow_partial_units_in_stock: Optional[bool] = False
row_created_timestamp: datetime
Expand All @@ -100,6 +100,9 @@ class ProductData(BaseModel):

location_id_validator = _field_not_empty_validator("location_id")
product_group_id_validator = _field_not_empty_validator("product_group_id")
qu_factor_purchase_to_stock_validator = _field_not_empty_validator(
"qu_factor_purchase_to_stock"
)


class ChoreData(BaseModel):
Expand Down

0 comments on commit 2ef301d

Please sign in to comment.