From d97df9cddde086fb25a5da511d69c8924752dd17 Mon Sep 17 00:00:00 2001 From: Raphael Michel Date: Mon, 11 Dec 2017 15:30:20 +0100 Subject: [PATCH] Checkout UX: Do not show minutes with decimal places in the countdown --- src/pretix/presale/views/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pretix/presale/views/__init__.py b/src/pretix/presale/views/__init__.py index b7c29bd9fa..71fd344728 100644 --- a/src/pretix/presale/views/__init__.py +++ b/src/pretix/presale/views/__init__.py @@ -134,8 +134,8 @@ class CartMixin: try: first_expiry = min(p.expires for p in positions) if positions else now() total_seconds_left = max(first_expiry - now(), timedelta()).total_seconds() - minutes_left = total_seconds_left // 60 - seconds_left = total_seconds_left % 60 + minutes_left = int(total_seconds_left // 60) + seconds_left = int(total_seconds_left % 60) except AttributeError: first_expiry = None minutes_left = None