fix: document delete image files check file exist

pull/21991/head
quicksandzn 11 months ago
parent c48b32c9e3
commit c7c65d85fd

@ -325,7 +325,8 @@ class IndexingRunner:
"Delete image_files failed while indexing_estimate, \
image_upload_file_is: {}".format(upload_file_id)
)
db.session.delete(image_file)
if image_file:
db.session.delete(image_file)
if doc_form and doc_form == "qa_model":
return IndexingEstimate(total_segments=total_segments * 20, qa_preview=preview_texts, preview=[])

Loading…
Cancel
Save