Changed initial_weight to be net weight, not gross weight

This commit is contained in:
Matt Gerega
2024-04-10 11:00:46 -04:00
parent dad446621f
commit c6f9abeced
14 changed files with 159 additions and 203 deletions

View File

@@ -42,10 +42,10 @@ class SpoolParameters(BaseModel):
)
initial_weight: Optional[float] = Field(
ge=0,
description="The initial total weight of the filament and spool, in grams. (gross weight)",
description="The initial weight of the filament on the spool, in grams. (net weight)",
example=200,
)
empty_weight: Optional[float] = Field(
spool_weight: Optional[float] = Field(
ge=0,
description="The weight of an empty spool, in grams. (tare weight)",
example=200,
@@ -369,7 +369,7 @@ async def create( # noqa: ANN201
filament_id=body.filament_id,
price=body.price,
initial_weight=body.initial_weight,
empty_weight=body.empty_weight,
spool_weight=body.spool_weight,
remaining_weight=body.remaining_weight,
used_weight=body.used_weight,
first_used=body.first_used,