️ Stop.postal_region and Line.id/operator_id can be integer values

This commit is contained in:
2023-05-08 17:15:21 +02:00
parent 0f1c16ab53
commit 0ba4c1e6fa
5 changed files with 36 additions and 12 deletions

View File

@@ -73,13 +73,11 @@ trace.set_tracer_provider(TracerProvider())
trace.get_tracer_provider().add_span_processor(BatchSpanProcessor(OTLPSpanExporter()))
tracer = trace.get_tracer(APP_NAME)
with tracer.start_as_current_span("foo"):
print("Hello world!")
idfm_interface = IdfmInterface(API_KEY, db)
# TODO: Add command line argument to force database reset.
@app.on_event("startup")
async def startup():
await db.connect(DB_PATH, clear_static_data=True)
@@ -102,7 +100,7 @@ def optional_datetime_to_ts(dt: datetime | None) -> int | None:
@app.get("/line/{line_id}", response_model=LineSchema)
async def get_line(line_id: str) -> LineSchema:
async def get_line(line_id: int) -> LineSchema:
line: Line | None = await Line.get_by_id(line_id)
if line is None: