From 90df9abdf966045b90e7d63440a33d5a4f2eb5d1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20P=C3=A9ters?= Date: Mon, 21 Nov 2011 18:09:45 +0100 Subject: [PATCH] work around some silliness --- tabellio/documents/document.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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):