From dd13da88936d87baaa63fdd8e19af1a62e70a273 Mon Sep 17 00:00:00 2001 From: Sven Augustin Date: Wed, 3 Jun 2026 23:00:14 +0200 Subject: [PATCH] renamed: row -> entries --- stand/api.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/stand/api.py b/stand/api.py index abb0acd..36ae4bc 100644 --- a/stand/api.py +++ b/stand/api.py @@ -27,16 +27,16 @@ def clear_pgroup(beamline: Beamline, pgroup: PGroup): @router.post("/pgroups/{pgroup}/runs/{run}") -def append_run(beamline: Beamline, pgroup: PGroup, run: int, row: dict[str, Any]): +def append_run(beamline: Beamline, pgroup: PGroup, run: int, entries: dict[str, Any]): lib = adb.get(beamline) run_exists = lib.has_index(pgroup, run) if run_exists: raise HTTPException(HTTPStatus.CONFLICT, f"run {run} exists already in {beamline}/{pgroup}") - timestamp = row.pop("timestamp", None) + timestamp = entries.pop("timestamp", None) timestamp = datetime.fromisoformat(timestamp) if timestamp else datetime.now() - row = {"timestamp": timestamp, **row} # setdefault would not force timestamp to be the first column + row = {"timestamp": timestamp, **entries} # setdefault would not force timestamp to be the first column df = pd.DataFrame(row, index=[run]) lib.append_data(pgroup, df)