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