aboutsummaryrefslogtreecommitdiff
path: root/management
diff options
context:
space:
mode:
authorAlban Gruin2017-10-01 16:44:53 +0200
committerAlban Gruin2017-10-01 16:44:53 +0200
commitf0c61f1a3a26f8c76f43b21f7860d83041b7fe89 (patch)
treec7b6cb49c465dab6d72c90542d03e61b8b5c49e2 /management
parente004bf8b70d1f8142e63748ea737e8c0ac8fcfda (diff)
Ajout d’une colonne pour stocker la date de dernière mise à jour
Diffstat (limited to 'management')
-rw-r--r--management/commands/timetables.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/management/commands/timetables.py b/management/commands/timetables.py
index e82fd55..76f0a7c 100644
--- a/management/commands/timetables.py
+++ b/management/commands/timetables.py
@@ -50,6 +50,9 @@ def process_timetable_week(timetable, soup, weeks_in_soup, force, year=None, wee
for course in get_events(timetable, soup, weeks_in_soup, year, week):
course.save()
+ timetable.last_update_date = new_update_date
+ timetable.save()
+
def process_timetable(timetable, force, year=None, weeks=None):
soup = get_xml(timetable.url)
weeks_in_soup = get_weeks(soup)