Skip to content
Snippets Groups Projects
Commit 84d3fe4d authored by Robert Goldmann's avatar Robert Goldmann
Browse files

fixed pydantic schema for MeasurementCreate

parent 2942f7ae
No related branches found
No related tags found
No related merge requests found
...@@ -3,7 +3,6 @@ from enum import Enum ...@@ -3,7 +3,6 @@ from enum import Enum
from typing import List from typing import List
from pydantic import BaseModel, Field from pydantic import BaseModel, Field
from typing import Optional
# ===== special ===== # ===== special =====
...@@ -73,7 +72,7 @@ class Measurement(BaseModel): ...@@ -73,7 +72,7 @@ class Measurement(BaseModel):
class MeasurementCreate(BaseModel): class MeasurementCreate(BaseModel):
value: str = Field(..., min_length=1) value: str = Field(..., min_length=1)
timestamp: Optional[str] timestamp: str | None = None
sensor_id: int sensor_id: int
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment