From 49723831e923efca7bf3882cdde6b8c9501ada32 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luk=C3=A1=C5=A1=20Kucharczyk?= Date: Mon, 9 Jan 2023 22:05:12 +0100 Subject: [PATCH] Fix displaying finish button --- Dockerfile | 2 +- src/web/tracker/views.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 4810bff..235d347 100644 --- a/Dockerfile +++ b/Dockerfile @@ -6,7 +6,7 @@ RUN npm install && \ FROM python:3.10.9-alpine -ENV VERSION_NUMBER 0.1.2-10-g97467c7 +ENV VERSION_NUMBER 0.1.2-11-g025ea0d ENV PROD 1 RUN apk add \ diff --git a/src/web/tracker/views.py b/src/web/tracker/views.py index 8418537..0e3e08b 100644 --- a/src/web/tracker/views.py +++ b/src/web/tracker/views.py @@ -56,7 +56,7 @@ def list_sessions(request, purchase_id=None): dataset = Session.objects.all().order_by("timestamp_start") for session in dataset: - if session.timestamp_end == None and session.duration_manual == None: + if session.timestamp_end == None and session.duration_manual.seconds == 0: session.timestamp_end = datetime.now(ZoneInfo(settings.TIME_ZONE)) session.unfinished = True