diff --git a/pygrocy/data_models/product.py b/pygrocy/data_models/product.py index aaf1e10..62bc500 100644 --- a/pygrocy/data_models/product.py +++ b/pygrocy/data_models/product.py @@ -77,7 +77,6 @@ def _init_empty(self): self._best_before_date = None self._default_quantity_unit_purchase = None - self._qu_factor_purchase_to_stock = None self._barcodes = [] self._product_group_id = None @@ -115,7 +114,6 @@ def _init_from_ProductData(self, product: ProductData): self._id = product.id self._product_group_id = product.product_group_id self._name = product.name - self._qu_factor_purchase_to_stock = product.qu_factor_purchase_to_stock def _init_from_StockLogResponse(self, response: StockLogResponse): self._id = response.product_id @@ -184,10 +182,6 @@ def is_partly_in_stock(self) -> int: def default_quantity_unit_purchase(self) -> QuantityUnit: return self._default_quantity_unit_purchase - @property - def qu_factor_purchase_to_stock(self) -> float: - return self._qu_factor_purchase_to_stock - class Group(DataModel): def __init__(self, raw_product_group: LocationData): diff --git a/pygrocy/data_models/task.py b/pygrocy/data_models/task.py index 00aa0fe..28ba687 100644 --- a/pygrocy/data_models/task.py +++ b/pygrocy/data_models/task.py @@ -32,7 +32,6 @@ def row_created_timestamp(self) -> datetime: class Task(DataModel): def __init__(self, response: TaskResponse): - self._id = response.id self._name = response.name self._description = response.description diff --git a/pygrocy/grocy_api_client.py b/pygrocy/grocy_api_client.py index 510bb30..c8dc1cd 100644 --- a/pygrocy/grocy_api_client.py +++ b/pygrocy/grocy_api_client.py @@ -91,7 +91,6 @@ class ProductData(BaseModel): product_group_id: Optional[int] = None qu_id_stock: int qu_id_purchase: int - 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 @@ -100,9 +99,6 @@ 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): diff --git a/test/test_product.py b/test/test_product.py index 8619b1c..ffffc04 100644 --- a/test/test_product.py +++ b/test/test_product.py @@ -23,7 +23,6 @@ def test_product_get_details_valid(self, grocy): assert product.name == "Gulash soup" assert product.available_amount == 5 assert product.product_group_id == 3 - assert product.qu_factor_purchase_to_stock == 1.0 assert product.default_quantity_unit_purchase.id == 5 assert product.default_quantity_unit_purchase.name == "Tin" assert product.default_quantity_unit_purchase.description is None