We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d4ba9b9 commit ca87b6bCopy full SHA for ca87b6b
backend/app/api/routes/documents.py
@@ -74,7 +74,11 @@ def delete_doc(
74
))
75
.values(deleted_at=deleted_at)
76
)
77
- session.exec(statement)
+ result = session.exec(statement)
78
+ if not result.rowcount:
79
+ detail = f'Item "{doc_id}" not found'
80
+ raise HTTPException(status_code=404, detail=detail)
81
+ session.commit()
82
83
# TODO: perform delete on the collection
84
0 commit comments