Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Kasra Jamshidi
erp5
Commits
d54ccfbc
Commit
d54ccfbc
authored
12 years ago
by
Jérome Perrin
Browse files
Options
Download
Email Patches
Plain Diff
mergeRevision: Do not trust catalog
Signed-off-by:
Aurélien Calonne
<
aurel@nexedi.com
>
parent
11cfc320
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
1 deletion
+7
-1
product/ERP5/Document/Document.py
product/ERP5/Document/Document.py
+7
-1
No files found.
product/ERP5/Document/Document.py
View file @
d54ccfbc
...
...
@@ -595,6 +595,7 @@ class Document(DocumentExtensibleTraversableMixin, XMLObject, UrlMixin,
"""
document
=
self
if
self
.
getReference
():
invalid_validation_state_list
=
(
'archived'
,
'cancelled'
,
'deleted'
)
catalog
=
self
.
getPortalObject
().
portal_catalog
# Find all document with same (reference, version, language)
kw
=
dict
(
portal_type
=
self
.
getPortalType
(),
...
...
@@ -614,7 +615,12 @@ class Document(DocumentExtensibleTraversableMixin, XMLObject, UrlMixin,
o
.
getVersion
()
==
self
.
getVersion
()
and
\
o
.
getLanguage
()
==
self
.
getLanguage
():
existing_document
=
o
.
getObject
()
break
if
existing_document
.
getValidationState
()
not
in
\
invalid_validation_state_list
:
break
else
:
existing_document
=
None
# We found an existing document to update
if
existing_document
is
not
None
:
document
=
existing_document
...
...
This diff is collapsed.
Click to expand it.
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