fnp
/
redakcja.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Bit nicer source flow.
[redakcja.git]
/
src
/
depot
/
publishers
/
legimi.py
diff --git
a/src/depot/publishers/legimi.py
b/src/depot/publishers/legimi.py
index
e6fe5b5
..
da22245
100644
(file)
--- 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):
})
def can_publish(self, site, book):
- meta = book.wldocument(librarian2=True).meta
d = {
'errors': [],
'warnings': [],
'info': []
}
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(
thema = self.get_thema(meta)
if thema:
d['info'].append(mark_safe(