diff options
author | Alban Gruin | 2017-09-06 17:55:56 +0200 |
---|---|---|
committer | Alban Gruin | 2017-09-06 17:55:56 +0200 |
commit | 735041124f1df31c5c947f13ee34bdf3e747d703 (patch) | |
tree | 26cdf3a6f41ced4bdc113c9e4dbe9fb08080f0dc /management/commands/timetables.py | |
parent | 25166bcee501d1e5d72a2d2372cbeb5c3b82eec7 (diff) |
Le parseur récupère l’ID des événements et les stocke dans la base
Diffstat (limited to 'management/commands/timetables.py')
-rw-r--r-- | management/commands/timetables.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/management/commands/timetables.py b/management/commands/timetables.py index 0984c92..64f90fa 100644 --- a/management/commands/timetables.py +++ b/management/commands/timetables.py @@ -26,8 +26,8 @@ import datetime @transaction.atomic def process_timetable_week(timetable, year, week, soup, weeks_in_soup): delete_courses_in_week(timetable, year, week) - for name, type_, groups, rooms, notes, begin, end in get_events(timetable, year, week, soup, weeks_in_soup): - course = Course.objects.create(timetable=timetable, begin=begin, end=end) + for name, type_, groups, rooms, notes, begin, end, celcat_id in get_events(timetable, year, week, soup, weeks_in_soup): + course = Course.objects.create(timetable=timetable, begin=begin, end=end, celcat_id=celcat_id) course.name = name course.type = type_ course.notes = notes |