fix: pass app_root to MessageUploadService in message sending
Some checks are pending
NordaBiz Tests / Unit & Integration Tests (push) Waiting to run
NordaBiz Tests / E2E Tests (Playwright) (push) Blocked by required conditions
NordaBiz Tests / Smoke Tests (Production) (push) Blocked by required conditions
NordaBiz Tests / Send Failure Notification (push) Blocked by required conditions
Some checks are pending
NordaBiz Tests / Unit & Integration Tests (push) Waiting to run
NordaBiz Tests / E2E Tests (Playwright) (push) Blocked by required conditions
NordaBiz Tests / Smoke Tests (Production) (push) Blocked by required conditions
NordaBiz Tests / Send Failure Notification (push) Blocked by required conditions
MessageUploadService.__init__() requires app_root but was called without arguments, causing send_message errors and double-sending due to JS retry. Now uses current_app.root_path. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
e46233c09c
commit
58485fc6c1
@ -222,7 +222,8 @@ def send_message(conv_id):
|
|||||||
if files:
|
if files:
|
||||||
try:
|
try:
|
||||||
from message_upload_service import MessageUploadService
|
from message_upload_service import MessageUploadService
|
||||||
upload_service = MessageUploadService()
|
from flask import current_app
|
||||||
|
upload_service = MessageUploadService(current_app.root_path)
|
||||||
for f in files:
|
for f in files:
|
||||||
result = upload_service.save_file(f)
|
result = upload_service.save_file(f)
|
||||||
if result['success']:
|
if result['success']:
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user