From: Radek Czajka Date: Mon, 11 Feb 2013 11:41:00 +0000 (+0100) Subject: don't reset order on republish X-Git-Url: https://git.mdrn.pl/edumed.git/commitdiff_plain/c5f4d6f7fc2c876a56e7fcac2a9965e64f05c191 don't reset order on republish --- diff --git a/catalogue/models.py b/catalogue/models.py index 46d026c..916c5b1 100644 --- a/catalogue/models.py +++ b/catalogue/models.py @@ -111,7 +111,7 @@ class Lesson(models.Model): try: lesson = cls.objects.get(slug=slug) except cls.DoesNotExist: - lesson = cls(slug=slug) + lesson = cls(slug=slug, order=0) lesson.attachment_set.all().delete() for att_name, att_file in infile.attachments.items(): @@ -127,7 +127,6 @@ class Lesson(models.Model): lesson.title = wldoc.book_info.title lesson.level = Level.objects.get(slug=wldoc.book_info.audience) - lesson.order = 0 lesson.populate_dc() lesson.build_html() lesson.build_package()