Skip to content

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

Cast max_age of cart cookie to int

Krzysztof Wolskid019b5a9cfea
diff --git a/saleor/cart/utils.py b/saleor/cart/utils.py
index 98cce038cb..efb5f72f69 100644
--- a/saleor/cart/utils.py
+++ b/saleor/cart/utils.py
@@ -24,7 +24,7 @@ def set_cart_cookie(simple_cart, response):
# FIXME: document why session is not used
ten_years = timedelta(days=(365 * 10))
response.set_signed_cookie(
- COOKIE_NAME, simple_cart.token, max_age=ten_years.total_seconds())
+ COOKIE_NAME, simple_cart.token, max_age=int(ten_years.total_seconds()))
def contains_unavailable_variants(cart):