X-Git-Url: https://git.mdrn.pl/redakcja.git/blobdiff_plain/91a20d3c82e0edcd883148b14df90b56a38ba2b2..ff58bad61fad779f3eeedccd01de4e7c07d94f1c:/src/isbn/models.py?ds=sidebyside 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: