From a8f22fb741b38387e467f0d3c76e6e10f72f3606 Mon Sep 17 00:00:00 2001 From: dogeystamp Date: Sat, 20 May 2023 23:06:01 -0400 Subject: [PATCH] sachet/server/files/views.py: fix db integrity error i'll be honest i have no idea what just happened --- sachet/server/files/views.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/sachet/server/files/views.py b/sachet/server/files/views.py index f4b5a5e..4beedfd 100644 --- a/sachet/server/files/views.py +++ b/sachet/server/files/views.py @@ -111,9 +111,7 @@ class FileContentAPI(MethodView): if upload.completed: share.initialized = True - # really convoluted - # but otherwise it doesn't cascade deletes? - Upload.query.filter(Upload.upload_id == upload.upload_id).delete() + db.session.delete(upload) db.session.commit() return jsonify(dict(status="success", message="Upload completed.")), 201 else: