X-Git-Url: https://git.mdrn.pl/librarian.git/blobdiff_plain/26aa2369c47124fb322236e03084324914aa24af..d0475d381f12b2c89c7c514c4f7f7d2ebc421d0a:/librarian/pypdf.py diff --git a/librarian/pypdf.py b/librarian/pypdf.py index b99f6ad..bb2881f 100644 --- a/librarian/pypdf.py +++ b/librarian/pypdf.py @@ -261,7 +261,7 @@ class EduModule(Xmill): counter = self.activity_counter - if element.getnext().tag == 'aktywnosc' or self.activity_last.getnext() == element: + if element.getnext().tag == 'aktywnosc' or (self.activity_last and self.activity_last.getnext() == element): counter_tex = """%(counter)d.""" % locals() else: counter_tex = ''