From 025ea0dd4e275bba9dd803101a9fd0a6eef9d6d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luk=C3=A1=C5=A1=20Kucharczyk?= Date: Mon, 9 Jan 2023 19:09:31 +0100 Subject: [PATCH] Fix migration --- Dockerfile | 2 +- src/web/tracker/migrations/0006_auto_20230109_1904.py | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index 66a5efe..4810bff 100644 --- a/Dockerfile +++ b/Dockerfile @@ -6,7 +6,7 @@ RUN npm install && \ FROM python:3.10.9-alpine -ENV VERSION_NUMBER 0.1.2-9-g7842d6f +ENV VERSION_NUMBER 0.1.2-10-g97467c7 ENV PROD 1 RUN apk add \ diff --git a/src/web/tracker/migrations/0006_auto_20230109_1904.py b/src/web/tracker/migrations/0006_auto_20230109_1904.py index c2facb6..dfdb52c 100644 --- a/src/web/tracker/migrations/0006_auto_20230109_1904.py +++ b/src/web/tracker/migrations/0006_auto_20230109_1904.py @@ -7,16 +7,16 @@ from datetime import timedelta def set_duration_manual_none_to_zero(apps, schema_editor): Session = apps.get_model("tracker", "Session") for session in Session.objects.all(): - if session.duration_calculated == None: - session.duration_calculated = timedelta(0) + if session.duration_manual == None: + session.duration_manual = timedelta(0) session.save() def revert_set_duration_manual_none_to_zero(apps, schema_editor): Session = apps.get_model("tracker", "Session") for session in Session.objects.all(): - if session.duration_calculated == timedelta(0): - session.duration_calculated = None + if session.duration_manual == timedelta(0): + session.duration_manual = None session.save()