Skip to content

Saleor Core: the high performance, composable, headless commerce API.

Add comment to refreshing obj from db

Maciej Korycinskidaf9f62c7495
diff --git a/saleor/checkout/views/__init__.py b/saleor/checkout/views/__init__.py
index 1912e6a705..42bfe892fb 100644
--- a/saleor/checkout/views/__init__.py
+++ b/saleor/checkout/views/__init__.py
@@ -218,6 +218,7 @@ def update_checkout_line(request, checkout, variant_id):
if form.is_valid():
form.save()
checkout.refresh_from_db()
+ # Refresh obj from db and confirm that checkout still has this line
checkout_line = checkout.lines.filter(variant_id=variant_id).first()
line_total = ZERO_TAXED_MONEY
if checkout_line: