diff options
author | Alban Gruin | 2017-09-24 17:16:10 +0200 |
---|---|---|
committer | Alban Gruin | 2017-09-24 17:16:10 +0200 |
commit | e30b0c673cae607175c5bae6df6e87d8b100bdf3 (patch) | |
tree | 2ffc269ad5e56ff93e2ecd3bded5843a585c4fe7 /management/commands/cleancourses.py | |
parent | 77748ec01d1ef59d8436597a9b52675b309e1c4d (diff) |
Suppression du modèle LastUpdate, utilisation du champ last_update à
la place.
Diffstat (limited to 'management/commands/cleancourses.py')
-rw-r--r-- | management/commands/cleancourses.py | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/management/commands/cleancourses.py b/management/commands/cleancourses.py index ca2ef94..f6041ef 100644 --- a/management/commands/cleancourses.py +++ b/management/commands/cleancourses.py @@ -15,7 +15,7 @@ from django.core.management.base import BaseCommand from django.db import transaction -from edt.models import Course, Group, LastUpdate +from edt.models import Course, Group class Command(BaseCommand): @@ -29,10 +29,8 @@ class Command(BaseCommand): if options["timetable"] is None: Course.objects.all().delete() Group.objects.all().delete() - LastUpdate.objects.all().delete() else: Course.objects.filter(timetable__id__in=options["timetable"]).delete() Group.objects.filter(timetable__id__in=options["timetable"]).delete() - LastUpdate.objects.filter(timetable__id__in=options["timetable"]).delete() self.stdout.write(self.style.SUCCESS("Done.")) |