fnp
/
redakcja.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4628276
)
fix for bad documents.
author
Radek Czajka
<rczajka@rczajka.pl>
Mon, 16 Oct 2023 13:28:03 +0000
(15:28 +0200)
committer
Radek Czajka
<rczajka@rczajka.pl>
Mon, 16 Oct 2023 13:28:03 +0000
(15:28 +0200)
src/isbn/models.py
patch
|
blob
|
history
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
- 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: