diff --git a/tabellio/documents/document.py b/tabellio/documents/document.py index 6f991bc..4bc99ec 100644 --- a/tabellio/documents/document.py +++ b/tabellio/documents/document.py @@ -92,7 +92,7 @@ class Document(Item, BasePublication): def related_elements(self, max_items=5, closeness=0.5): r = BasePublication.related_elements(self, max_items, closeness) doc_ids = [x.id for x in self.associated_docs] - return [x for x in r if x.getId() not in doc_ids] + return [x for x in r if ((type(x.getId) is str) and x.getId or x.getId()) not in doc_ids] @property def publication_date_str(self):