]> git.ipfire.org Git - pbs.git/commitdiff
API: Fix deleting uploads
authorMichael Tremer <michael.tremer@ipfire.org>
Wed, 2 Jul 2025 14:05:00 +0000 (14:05 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Wed, 2 Jul 2025 14:05:00 +0000 (14:05 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/api/uploads.py

index 6570aa48062a02ffbac83d7380d0955bcfa5efa5..e20620ae1198c7a78650ec96681e2c06b469bf9a 100644 (file)
@@ -129,7 +129,7 @@ async def put(request: fastapi.Request, upload: uploads.Upload = fastapi.Depends
 @router.delete("/{id}")
 async def delete(upload: uploads.Upload = fastapi.Depends(get_upload)):
        # Delete the upload
-       async with backend.db() as session:
+       async with backend.db as session:
                await upload.delete()
 
        # Send 204