From: Jan Szejko Date: Tue, 21 Jun 2016 08:30:17 +0000 (+0200) Subject: fix conversion wl2 to wl1 X-Git-Url: https://git.mdrn.pl/redakcja.git/commitdiff_plain/e8993f5e4209eb1ab0b6435691df9217d843c76d fix conversion wl2 to wl1 --- diff --git a/apps/catalogue/models/book.py b/apps/catalogue/models/book.py index f58fe108..b0862f00 100755 --- a/apps/catalogue/models/book.py +++ b/apps/catalogue/models/book.py @@ -463,7 +463,7 @@ class Book(models.Model): i1 = etree.parse(f2) for sect in i1.findall('//section'): - if sect[0].text == u'Przebieg zajęć': + if sect[0].text and sect[0].text.strip() == u'Przebieg zajęć': # Prostujemy. first = sect.find('section') subs = first.findall('.//section')