Added complex books and organized books in folders.
[wolnelektury.git] / apps / catalogue / models.py
index f31dbe6..2a93873 100644 (file)
@@ -166,7 +166,7 @@ class Book(models.Model):
         book.tags = book_tags
         
         if hasattr(book_info, 'parts'):
-            for part_url, n in enumerate(book_info.parts):
+            for n, part_url in enumerate(book_info.parts):
                 base, slug = part_url.rsplit('/', 1)
                 child_book = Book.objects.get(slug=slug)
                 child_book.parent = book