Checkout UX: Do not show minutes with decimal places in the countdown

This commit is contained in:
Raphael Michel
2017-12-11 15:30:20 +01:00
parent 33a254ce92
commit d97df9cddd

View File

@@ -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