From 15ed6504b1d5d954d61a084082100a92c7652edd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luk=C3=A1=C5=A1=20Kucharczyk?= Date: Thu, 5 Jan 2023 23:30:13 +0100 Subject: [PATCH] Order by timestamp_start by default --- CHANGELOG.md | 1 + Dockerfile | 2 +- src/web/tracker/views.py | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ed9b58b..2edad54 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,5 @@ ## Unreleased +* Order by timestamp_start by default * Add pre-commit hook to update version * Improve the newcomer experience by guiding through each step * Fix errors with empty database diff --git a/Dockerfile b/Dockerfile index ae9d4cf..25d9438 100644 --- a/Dockerfile +++ b/Dockerfile @@ -6,7 +6,7 @@ RUN npm install && \ FROM python:3.10-slim-bullseye -ENV VERSION_NUMBER 0.1.0-45-g5172c38 +ENV VERSION_NUMBER 0.1.0-46-gfd9bf8c ENV PROD 1 RUN useradd --create-home --uid 1000 timetracker diff --git a/src/web/tracker/views.py b/src/web/tracker/views.py index 9db1fd6..65d0bc9 100644 --- a/src/web/tracker/views.py +++ b/src/web/tracker/views.py @@ -53,7 +53,7 @@ def list_sessions(request, purchase_id=None): dataset = Session.objects.filter(purchase=purchase_id) context["purchase"] = Purchase.objects.get(id=purchase_id) else: - dataset = Session.objects.all() + dataset = Session.objects.all().order_by("timestamp_start") for session in dataset: if session.timestamp_end == None and session.duration_manual == None: