diff options
author | Alban Gruin | 2017-10-03 09:28:49 +0200 |
---|---|---|
committer | Alban Gruin | 2017-10-03 09:28:49 +0200 |
commit | ae3358c1296a02352409910a9ffcc2307d5ea87a (patch) | |
tree | b47df3b99f639acc24d751cc0a6a73937c10069b /management/commands/cleancourses.py | |
parent | 9641fc9bb6ef2897c0d70e6d5d5ed3f8e295dbec (diff) | |
parent | 175fcd46f56d8c1c5d10a50b401c09c25cfcdf82 (diff) |
Merge branch 'stable/0.10.z' into prod/pa1ch/0.y.zv0.10.0-pa1ch
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.")) |