Commit 3df2c446 authored by Jérome Perrin's avatar Jérome Perrin

getSimilarCloudValueList: don't call getLatestVersionValue twice

It should prevent a random failure
parent 0aa3590b
......@@ -453,11 +453,11 @@ class Document(DocumentExtensibleTraversableMixin, XMLObject, UrlMixin,
lista_latest = {}
for o in lista.keys():
lista_latest[o.getLatestVersionValue()] = True # get latest versions avoiding duplicates again
if lista_latest.has_key(self):
lista_latest.pop(self) # remove this document
if lista_latest.has_key(self.getLatestVersionValue()):
# remove last version of document itself from related documents
lista_latest.pop(self.getLatestVersionValue())
# remove this document
lista_latest.pop(self, None)
# remove last version of document itself from related documents
lista_latest.pop(self.getLatestVersionValue(), None)
return lista_latest.keys()
......
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