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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
iv
erp5
Commits
25120fff
Commit
25120fff
authored
Aug 18, 2016
by
iv
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ERP5Workflow: fix wrong string logic when getReference should remove prefix
parent
c39da357
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
product/ERP5Type/id_as_reference.py
product/ERP5Type/id_as_reference.py
+3
-3
No files found.
product/ERP5Type/id_as_reference.py
View file @
25120fff
...
...
@@ -36,7 +36,7 @@ from Acquisition import aq_base
def
IdAsReferenceMixin
(
extra_string
,
string_type
=
"suffix"
):
extra_string_index
=
-
len
(
extra_string
)
extra_string_index
=
len
(
extra_string
)
class
IdAsReferenceMixin
(
object
):
# Declarative security
...
...
@@ -56,8 +56,8 @@ def IdAsReferenceMixin(extra_string, string_type="suffix"):
def
getReference
(
self
,
*
args
):
id
=
self
.
id
if
string_type
==
"suffix"
:
if
id
[
extra_string_index
:]
==
extra_string
:
return
id
[:
extra_string_index
]
if
id
[
-
extra_string_index
:]
==
extra_string
:
return
id
[:
-
extra_string_index
]
try
:
return
self
.
_baseGetReference
(
*
args
)
except
AttributeError
:
...
...
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