X-Git-Url: https://git.mdrn.pl/redakcja.git/blobdiff_plain/91a20d3c82e0edcd883148b14df90b56a38ba2b2..32ee10aaf4c035a199a96c06bd2506befed5e17f:/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: