diff --git a/src/backend/models/api/measurement.py b/src/backend/models/api/measurement.py index 4b5980e..7aabeb3 100644 --- a/src/backend/models/api/measurement.py +++ b/src/backend/models/api/measurement.py @@ -12,6 +12,11 @@ class MeasurementCreate(BaseModel): value: float lot_number: Optional[str] = Field(None, max_length=100) serial_number: Optional[str] = Field(None, max_length=100) + # "camera" is deliberately absent from this pattern, even though the ORM + # enum and the database allow it. Do not add it here: a camera + # measurement must be produced by vision_service.execute_task, never by a + # client posting JSON straight to this endpoint - there is no image, no + # graph and no engine_version behind a value that arrived this way. input_method: str = Field("manual", pattern="^(usb_caliper|manual)$") input_duration_ms: Optional[int] = Field(None, ge=0) # The production this belongs to, when one is open at the station.