Commit d75e1c14cb743da536344705d70052ade7b86c28

Authored by Alexis Koralewski
1 parent 32502b8b
Exists in dev

Fix routine_manager tests

CHANGELOG
1   -02-12-2022 (AKo): v0.6.15.0
  1 +02-12-2022 (AKo): v0.6.15.1
2 2 - Fix initial_fixture with new path of models
3   -
  3 + - Fix routine_manager tests
  4 +
4 5 02-12-2022 (EP): v0.6.15.0
5 6 - Models splitting : no more monolithic common/models.py
6 7 => now : common, devices, user_manager, routine_manager
... ...
VERSION
1   -0.6.15.0
2 1 \ No newline at end of file
  2 +0.6.15.1
3 3 \ No newline at end of file
... ...
src/core/pyros_django/routine_manager/forms.py
... ... @@ -5,7 +5,7 @@ from django.forms.widgets import RadioSelect
5 5 from django.db.models.fields import PositiveIntegerField
6 6  
7 7 from common.models import *
8   -from routine_manager.models import Sequence, Album, Plan #, Request
  8 +from routine_manager.models import *
9 9  
10 10 from routine_manager.validators import check_album_validity
11 11  
... ...
src/core/pyros_django/routine_manager/views.py
... ... @@ -617,7 +617,7 @@ def create_sequence(request):
617 617 """
618 618 Create a new sequence and redirects to the editing action on it
619 619 """
620   - date_of_sequence = datetime.datetime.utcnow()
  620 + date_of_sequence = datetime.utcnow()
621 621 date_of_sequence = date_of_sequence.strftime("%Y%m%dT%H%M%S")
622 622 sp_of_user = request.user.get_scientific_program()
623 623 sp_list = ScientificProgram.objects.observable_programs().filter(id__in=sp_of_user)
... ... @@ -1053,7 +1053,7 @@ def copy_sequence(request, seq_id):
1053 1053 sequence_to_be_copied = Sequence.objects.get(id=seq_id)
1054 1054 original_sequence = Sequence.objects.get(id=seq_id)
1055 1055 new_seq = sequence_to_be_copied
1056   - date_of_sequence = datetime.datetime.utcnow()
  1056 + date_of_sequence = datetime.utcnow()
1057 1057 date_of_sequence = date_of_sequence.strftime("%Y%m%dT%H%M%S")
1058 1058 name = f"seq_{str(date_of_sequence)}"
1059 1059 new_seq.name = name
... ...