From 95ed76f356fd3f69566c6e127a9335f27a8813c1 Mon Sep 17 00:00:00 2001 From: MK Date: Tue, 11 Dec 2012 13:07:08 +0100 Subject: [PATCH] slug updates --- apps/catalogue/management/commands/import_wl.py | 8 ++++---- lib/librarian | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/apps/catalogue/management/commands/import_wl.py b/apps/catalogue/management/commands/import_wl.py index 5f603883..45fe63a0 100644 --- a/apps/catalogue/management/commands/import_wl.py +++ b/apps/catalogue/management/commands/import_wl.py @@ -47,7 +47,7 @@ class Command(BaseCommand): except (ParseError, ValidationError): pass else: - slugs[info.slug].append(b) + slugs[info.url.slug].append(b) book_count = 0 commit_args = { @@ -62,7 +62,7 @@ class Command(BaseCommand): book_detail = json.load(urllib2.urlopen(book['href'])) xml_text = urllib2.urlopen(book_detail['xml']).read() info = BookInfo.from_string(xml_text) - previous_books = slugs.get(info.slug) + previous_books = slugs.get(info.url.slug) if previous_books: if len(previous_books) > 1: print self.style.ERROR("There is more than one book " @@ -72,9 +72,9 @@ class Command(BaseCommand): else: previous_book = None comm = '*' - print book_count, info.slug , '-->', comm + print book_count, info.url.slug , '-->', comm Book.import_xml_text(xml_text, title=info.title[:255], - slug=info.slug[:128], previous_book=previous_book, + slug=info.url.slug[:128], previous_book=previous_book, commit_args=commit_args) book_count += 1 diff --git a/lib/librarian b/lib/librarian index 1ffcf32a..07e28ae2 160000 --- a/lib/librarian +++ b/lib/librarian @@ -1 +1 @@ -Subproject commit 1ffcf32a8d795681f54bd125ca45e908da5ed3fb +Subproject commit 07e28ae2390b14db006b1ed55897e2f7a256b8cc -- 2.20.1