mirror of
https://github.com/open-webui/open-webui.git
synced 2026-09-07 08:27:05 +00:00
fix: failed hash in files
This commit is contained in:
parent
9c5773d0af
commit
d3ab9f4b96
1 changed files with 2 additions and 1 deletions
|
|
@ -1734,10 +1734,10 @@ def process_file(
|
|||
db=db,
|
||||
)
|
||||
hash = calculate_sha256_string(text_content)
|
||||
Files.update_file_hash_by_id(file.id, hash, db=db)
|
||||
|
||||
if request.app.state.config.BYPASS_EMBEDDING_AND_RETRIEVAL:
|
||||
Files.update_file_data_by_id(file.id, {"status": "completed"}, db=db)
|
||||
Files.update_file_hash_by_id(file.id, hash, db=db)
|
||||
return {
|
||||
"status": True,
|
||||
"collection_name": None,
|
||||
|
|
@ -1774,6 +1774,7 @@ def process_file(
|
|||
{"status": "completed"},
|
||||
db=db,
|
||||
)
|
||||
Files.update_file_hash_by_id(file.id, hash, db=db)
|
||||
|
||||
return {
|
||||
"status": True,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue