Deletes associated file_data records when deleting a file.

This commit is contained in:
Aaron Louie 2020-01-23 12:17:58 -05:00
parent 72c3b10d7d
commit 91e33a1768
1 changed files with 2 additions and 1 deletions

View File

@ -88,5 +88,6 @@ def get_file_info(file_id):
def delete_file(file_id): def delete_file(file_id):
session.query(FileDataModel).filter_by(id=file_id).delete() session.query(FileDataModel).filter_by(file_model_id=file_id).delete()
session.query(FileModel).filter_by(id=file_id).delete() session.query(FileModel).filter_by(id=file_id).delete()
session.commit()