Skip to content
Snippets Groups Projects

Resolve "move_dates_for_testing throws misleading errors"

Merged Jonathan Weth requested to merge 33-move_dates_for_testing-throws-misleading-errors into master
2 files
+ 4
2
Compare changes
  • Side-by-side
  • Inline
Files
2
@@ -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",
Loading