From d75e1c14cb743da536344705d70052ade7b86c28 Mon Sep 17 00:00:00 2001 From: Alexis Koralewski Date: Fri, 2 Dec 2022 14:24:13 +0100 Subject: [PATCH] Fix routine_manager tests --- CHANGELOG | 5 +++-- VERSION | 2 +- src/core/pyros_django/routine_manager/forms.py | 2 +- src/core/pyros_django/routine_manager/views.py | 4 ++-- 4 files changed, 7 insertions(+), 6 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index b33fdac..cf95a25 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,6 +1,7 @@ -02-12-2022 (AKo): v0.6.15.0 +02-12-2022 (AKo): v0.6.15.1 - Fix initial_fixture with new path of models - + - Fix routine_manager tests + 02-12-2022 (EP): v0.6.15.0 - Models splitting : no more monolithic common/models.py => now : common, devices, user_manager, routine_manager diff --git a/VERSION b/VERSION index ed2bc35..b4f540c 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.6.15.0 \ No newline at end of file +0.6.15.1 \ No newline at end of file diff --git a/src/core/pyros_django/routine_manager/forms.py b/src/core/pyros_django/routine_manager/forms.py index b8cc0ed..027e7c3 100644 --- a/src/core/pyros_django/routine_manager/forms.py +++ b/src/core/pyros_django/routine_manager/forms.py @@ -5,7 +5,7 @@ from django.forms.widgets import RadioSelect from django.db.models.fields import PositiveIntegerField from common.models import * -from routine_manager.models import Sequence, Album, Plan #, Request +from routine_manager.models import * from routine_manager.validators import check_album_validity diff --git a/src/core/pyros_django/routine_manager/views.py b/src/core/pyros_django/routine_manager/views.py index 1f18d76..0eb96a0 100644 --- a/src/core/pyros_django/routine_manager/views.py +++ b/src/core/pyros_django/routine_manager/views.py @@ -617,7 +617,7 @@ def create_sequence(request): """ Create a new sequence and redirects to the editing action on it """ - date_of_sequence = datetime.datetime.utcnow() + date_of_sequence = datetime.utcnow() date_of_sequence = date_of_sequence.strftime("%Y%m%dT%H%M%S") sp_of_user = request.user.get_scientific_program() sp_list = ScientificProgram.objects.observable_programs().filter(id__in=sp_of_user) @@ -1053,7 +1053,7 @@ def copy_sequence(request, seq_id): sequence_to_be_copied = Sequence.objects.get(id=seq_id) original_sequence = Sequence.objects.get(id=seq_id) new_seq = sequence_to_be_copied - date_of_sequence = datetime.datetime.utcnow() + date_of_sequence = datetime.utcnow() date_of_sequence = date_of_sequence.strftime("%Y%m%dT%H%M%S") name = f"seq_{str(date_of_sequence)}" new_seq.name = name -- libgit2 0.21.2