Skip to content

Commit 2c9cf88

Browse files
committed
Some fixups
1 parent 143dfe6 commit 2c9cf88

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/apiserver/routes.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ def route_run_patch(run_id: str, patch: RunPatch, db: pymongo.database.Database
175175
"RunPatch.status[*] must have length exactly 2")
176176
p['$set'][f"status.{status_to_add[0]}"] = status_to_add[1]
177177
updated_run = db.runs.find_one_and_update(
178-
{'id': run_id}, p, projection=db_models.RunMainProj.FIELDS, return_document=pymongo.ReturnDocument.AFTER)
178+
{'_id': ObjectId(run_id)}, p, projection=db_models.RunMainProj.FIELDS, return_document=pymongo.ReturnDocument.AFTER)
179179
if updated_run is None:
180180
raise fastapi.HTTPException(404, 'RunNotFound')
181181
return updated_run

0 commit comments

Comments
 (0)