Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Laurent S
erp5
Commits
3df2c446
Commit
3df2c446
authored
Apr 08, 2013
by
Jérome Perrin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
getSimilarCloudValueList: don't call getLatestVersionValue twice
It should prevent a random failure
parent
0aa3590b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
product/ERP5/Document/Document.py
product/ERP5/Document/Document.py
+5
-5
No files found.
product/ERP5/Document/Document.py
View file @
3df2c446
...
@@ -453,11 +453,11 @@ class Document(DocumentExtensibleTraversableMixin, XMLObject, UrlMixin,
...
@@ -453,11 +453,11 @@ class Document(DocumentExtensibleTraversableMixin, XMLObject, UrlMixin,
lista_latest = {}
lista_latest = {}
for o in lista.keys():
for o in lista.keys():
lista_latest[o.getLatestVersionValue()] = True # get latest versions avoiding duplicates again
lista_latest[o.getLatestVersionValue()] = True # get latest versions avoiding duplicates again
if lista_latest.has_key(self):
lista_latest.pop(self)
# remove this document
# remove this document
if lista_latest.has_key(self.getLatestVersionValue()):
lista_latest.pop(self, None)
# remove last version of document itself from related documents
# remove last version of document itself from related documents
lista_latest.pop(self.getLatestVersionValue()
)
lista_latest.pop(self.getLatestVersionValue(), None
)
return lista_latest.keys()
return lista_latest.keys()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment