Revert "fix: add db.rollback() to prevent session state corruption during historical import"
This reverts commit fadc9036a2.
This commit is contained in:
@@ -711,10 +711,6 @@ class LetzshopOrderService:
|
||||
self.create_order(vendor_id, shipment)
|
||||
stats["imported"] += 1
|
||||
except Exception as e:
|
||||
# Rollback session to clear any partial changes from failed order
|
||||
# This is crucial because create_letzshop_order may have flushed
|
||||
# the order before the exception was raised (e.g., product not found)
|
||||
self.db.rollback()
|
||||
stats["errors"] += 1
|
||||
stats["error_messages"].append(
|
||||
f"Shipment {shipment_id}: {str(e)}"
|
||||
|
||||
Reference in New Issue
Block a user