sachet/server/files/views.py: fix db integrity error
i'll be honest i have no idea what just happened
This commit is contained in:
parent
cbf1310e1b
commit
a8f22fb741
@ -111,9 +111,7 @@ class FileContentAPI(MethodView):
|
|||||||
|
|
||||||
if upload.completed:
|
if upload.completed:
|
||||||
share.initialized = True
|
share.initialized = True
|
||||||
# really convoluted
|
db.session.delete(upload)
|
||||||
# but otherwise it doesn't cascade deletes?
|
|
||||||
Upload.query.filter(Upload.upload_id == upload.upload_id).delete()
|
|
||||||
db.session.commit()
|
db.session.commit()
|
||||||
return jsonify(dict(status="success", message="Upload completed.")), 201
|
return jsonify(dict(status="success", message="Upload completed.")), 201
|
||||||
else:
|
else:
|
||||||
|
Loading…
Reference in New Issue
Block a user