X-Git-Url: https://git.mdrn.pl/redakcja.git/blobdiff_plain/91a20d3c82e0edcd883148b14df90b56a38ba2b2..2dd9e6498b5e0bd5c0bd882db02be9768c34c019:/src/isbn/models.py diff --git a/src/isbn/models.py b/src/isbn/models.py index d2d62909..5c9bb449 100644 --- 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: