work around some silliness

This commit is contained in:
Frédéric Péters 2011-11-21 18:09:45 +01:00
parent 8210c76f35
commit 90df9abdf9
1 changed files with 1 additions and 1 deletions

View File

@ -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):