fix image files not deleted on indexing_estimate #9541 (#10798)

Co-authored-by: root <root@localhost.localdomain>
This commit is contained in:
wy96f 2024-11-21 13:03:16 +08:00 committed by GitHub
commit 94c9cadbd8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 16 additions and 0 deletions

View file

@ -51,6 +51,7 @@ def clean_document_task(document_id: str, dataset_id: str, doc_form: str, file_i
"Delete image_files failed when storage deleted, \
image_upload_file_is: {}".format(upload_file_id)
)
db.session.delete(image_file)
db.session.delete(segment)
db.session.commit()