aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--management/commands/timetables.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/management/commands/timetables.py b/management/commands/timetables.py
index 58c86fd..e82fd55 100644
--- a/management/commands/timetables.py
+++ b/management/commands/timetables.py
@@ -44,7 +44,8 @@ def process_timetable_week(timetable, soup, weeks_in_soup, force, year=None, wee
if year is not None and week is not None:
delete_courses_in_week(timetable, year, week)
else:
- Course.objects.filter(timetable=timetable).delete()
+ Course.objects.filter(timetable=timetable,
+ begin__gte=min(weeks_in_soup.values())).delete()
for course in get_events(timetable, soup, weeks_in_soup, year, week):
course.save()