X-Git-Url: https://git.mdrn.pl/redakcja.git/blobdiff_plain/4a8b54a88de9d528031701ec97224752f2e2b25b..c46844cb5a794566d15437b0c4a809e9230baecf:/src/depot/publishers/legimi.py?ds=inline diff --git a/src/depot/publishers/legimi.py b/src/depot/publishers/legimi.py index e6fe5b54..da222456 100644 --- a/src/depot/publishers/legimi.py +++ b/src/depot/publishers/legimi.py @@ -130,12 +130,16 @@ class Legimi(BasePublisher): }) def can_publish(self, site, book): - meta = book.wldocument(librarian2=True).meta d = { 'errors': [], 'warnings': [], 'info': [] } + try: + meta = book.wldocument(librarian2=True).meta + except: + d['errors'].append('Nieprawidłowy dokument.') + return d thema = self.get_thema(meta) if thema: d['info'].append(mark_safe(