Commit 13eb15d40f5feafc2be91e4a67f23c638051be54
1 parent
1b822613
Exists in
dev
fix sequence form if there is no next period
Showing
2 changed files
with
2 additions
and
2 deletions
Show diff stats
src/core/pyros_django/pyros/settings.py
... | ... | @@ -404,6 +404,6 @@ python_version = subprocess.run( "python --version | cut -d ' ' -f 2 | cut -d '. |
404 | 404 | python_version = python_version.stdout |
405 | 405 | day = "2022-01-06" |
406 | 406 | django_version_major,django_version_minor = django.VERSION[:2][0],django.VERSION[:2][1] |
407 | -pyros_version = "0.3.2.0" | |
407 | +pyros_version = "0.3.2.1" | |
408 | 408 | #pyros_version = "0.2.12.0" |
409 | 409 | VERSION_NUMBER = f"{pyros_version}_{django_version_major}.{django_version_minor}_{python_version}_{day}" | ... | ... |
src/core/pyros_django/routine_manager/forms.py
... | ... | @@ -150,7 +150,7 @@ class SequenceForm(forms.ModelForm): |
150 | 150 | if self.cleaned_data["target"]: |
151 | 151 | seq.target_coords = self.cleaned_data["target"] |
152 | 152 | period = Period.objects.exploitation_period() |
153 | - if Period.objects.next_period().start_date < self.cleaned_data["start_date"].date(): | |
153 | + if Period.objects.next_period() != None and Period.objects.next_period().start_date < self.cleaned_data["start_date"].date(): | |
154 | 154 | period = Period.objects.next_period() |
155 | 155 | seq.period = period |
156 | 156 | # remove all key linked to form in order to get config_attributes | ... | ... |