diff --git a/allofplos/article.py b/allofplos/article.py index c82172eb..cc9268eb 100644 --- a/allofplos/article.py +++ b/allofplos/article.py @@ -57,7 +57,8 @@ def __str__(self, exclude_refs=True): if exclude_refs: root = tree.getroot() back = tree.xpath('./back') - root.remove(back[0]) + if back: + root.remove(back[0]) local_xml = et.tostring(tree, method='xml', encoding='unicode',