From 996ddad2eaf8c6f2172158465d749616ae6497d3 Mon Sep 17 00:00:00 2001 From: giles Date: Fri, 27 Feb 2026 12:34:54 +0000 Subject: [PATCH] Fix ticket adjust: commit before cart-summary fetch The tickets adjust_quantity route fetches cart-summary from cart, which calls back to events for ticket counts. Without committing first, the callback misses the just-adjusted tickets. Co-Authored-By: Claude Opus 4.6 --- events/bp/tickets/routes.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/events/bp/tickets/routes.py b/events/bp/tickets/routes.py index 30bab2a..a7497b9 100644 --- a/events/bp/tickets/routes.py +++ b/events/bp/tickets/routes.py @@ -286,6 +286,10 @@ def register() -> Blueprint: ticket_type_id=tt.id, ) + # Commit so cart's callback to events sees the updated tickets + await g.tx.commit() + g.tx = await g.s.begin() + # Compute cart count for OOB mini-cart update from shared.infrastructure.data_client import fetch_data from shared.contracts.dtos import CartSummaryDTO, dto_from_dict