})
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(
return price
def can_publish(self, site, book):
- wldoc = book.wldocument(librarian2=True)
d = {
'warnings': [],
'errors': [],
'info': [],
}
+ try:
+ wldoc = book.wldocument(librarian2=True)
+ except:
+ d['errors'].append('Nieprawidłowy dokument.')
+ return d
errors = []
book_data = self.get_book_data(site, wldoc, errors)
for error in errors: