Commit bc3e0869 authored by Yusei Tahara's avatar Yusei Tahara

Prevent AttributeError.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@17730 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 8c6ebedf
......@@ -581,7 +581,9 @@ class Document(XMLObject, UrlMixIn, ConversionCacheMixin, SnapshotMixin):
# make it unique first time (before getting lastversionvalue)
di = dict.fromkeys([r.getObject() for r in lst])
# then get latest version and make unique again
di = dict.fromkeys([o.getLatestVersionValue() for o in di.keys()])
di = dict.fromkeys([o.getLatestVersionValue()
for o in di.keys()
if getattr(o, 'getLatestVersionValue', None)])
ref = self.getReference()
return [o for o in di.keys() if o.getReference() != ref] # every object has its own reference in SearchableText
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment