Skip to content
Snippets Groups Projects
Commit 2715d0b7 authored by Nik | Klampfradler's avatar Nik | Klampfradler
Browse files

Merge branch '33-move_dates_for_testing-throws-misleading-errors' into 'master'

Resolve "move_dates_for_testing throws misleading errors"

Closes #33

See merge request !100
parents 5536f59b f4e7efcf
No related branches found
No related tags found
1 merge request!100Resolve "move_dates_for_testing throws misleading errors"
Pipeline #46210 canceled
......@@ -18,6 +18,7 @@ Fixed
~~~~~
* Import failed if there were classes without class teachers.
* Management command ``move_dates_for_testing`` throwed misleading errors.
`2.0`_ - 2021-10-30
-------------------
......
......@@ -65,7 +65,7 @@ class Command(BaseCommand):
school_terms = SchoolTerm.objects.order_by("-date_end")
if not school_terms.exists():
raise RuntimeError("No validity range available.")
raise RuntimeError("No school term available.")
school_term = school_terms.first()
self.stdout.write(f"Used school term: {school_term}")
......@@ -90,7 +90,8 @@ class Command(BaseCommand):
)
if not self.weeks:
raise RuntimeError("You need at least one validity range to move data.")
self.stdout.write(self.style.ERROR("There are no data that have to be moved."))
return
self.translate_week_year(
"SUBSTITUTIONS",
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment