OK...I had to encode work.title, not work

pull/1/head
Raymond Yee 2012-02-13 15:02:14 -08:00
parent bf07c4b7ed
commit 5ff810049d
1 changed files with 1 additions and 1 deletions

View File

@ -24,7 +24,7 @@ class Command(BaseCommand):
for (i, work) in enumerate(islice(models.Work.objects.annotate(num_editions=Count('editions')).filter(num_editions=1, language=language),max)):
#check that there's still only one edition
print "%d %s id:%s #editions:%d #isbn:%s -->" % (i, work.encode('ascii','ignore'), work.id, work.editions.count(), work.first_isbn_13()),
print "%d %s id:%s #editions:%d #isbn:%s -->" % (i, work.title.encode('ascii','ignore'), work.id, work.editions.count(), work.first_isbn_13()),
if work.editions.count() != 1:
print
continue