From ad2c5411637f8c367f5ae564a0a3328af33bfc2f Mon Sep 17 00:00:00 2001 From: -LAN- Date: Fri, 22 Aug 2025 21:56:36 +0800 Subject: [PATCH] Fix missing database commit in provider update handler (#24357) --- .../event_handlers/update_provider_when_message_created.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/events/event_handlers/update_provider_when_message_created.py b/api/events/event_handlers/update_provider_when_message_created.py index 2ed42c71e..f01dd5890 100644 --- a/api/events/event_handlers/update_provider_when_message_created.py +++ b/api/events/event_handlers/update_provider_when_message_created.py @@ -188,7 +188,7 @@ def _execute_provider_updates(updates_to_perform: list[_ProviderUpdateOperation] # Use SQLAlchemy's context manager for transaction management # This automatically handles commit/rollback - with Session(db.engine) as session: + with Session(db.engine) as session, session.begin(): # Use a single transaction for all updates for update_operation in updates_to_perform: filters = update_operation.filters