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