fnp
/
redakcja.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Thema extension proposal.
[redakcja.git]
/
src
/
isbn
/
models.py
diff --git
a/src/isbn/models.py
b/src/isbn/models.py
index
d2d6290
..
5c9bb44
100644
(file)
--- a/
src/isbn/models.py
+++ b/
src/isbn/models.py
@@
-134,7
+134,10
@@
class Isbn(models.Model):
@classmethod
def formats_from_document(cls, document):
# This is a document
@classmethod
def formats_from_document(cls, document):
# This is a document
- meta = document.wldocument(librarian2=True).meta
+ try:
+ meta = document.wldocument(librarian2=True).meta
+ except:
+ return []
is_parent = len(meta.parts)
formats = []
for form, config in FORMS:
is_parent = len(meta.parts)
formats = []
for form, config in FORMS: