From c5f4d6f7fc2c876a56e7fcac2a9965e64f05c191 Mon Sep 17 00:00:00 2001 From: Radek Czajka Date: Mon, 11 Feb 2013 12:41:00 +0100 Subject: [PATCH] don't reset order on republish --- catalogue/models.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) 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() -- 2.20.1