diff options
author | Alban Gruin | 2017-09-30 16:34:58 +0200 |
---|---|---|
committer | Alban Gruin | 2017-09-30 16:34:58 +0200 |
commit | be6f084c336e285652088fe2d86694b2645a0b93 (patch) | |
tree | e73a722e6931f9fdc6ddcd51cc008a91aeb609f4 /management/commands/timetables.py | |
parent | 7a34fc91521373dddacd1595354da53187d46a5d (diff) |
On ne supprime pas les éléments plus anciens que ceux référencés par Celcat
Diffstat (limited to 'management/commands/timetables.py')
-rw-r--r-- | management/commands/timetables.py | 3 |
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() |