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
Alexander Emmerich
erp5
Commits
af519422
Commit
af519422
authored
May 20, 2011
by
Vincent Pelletier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
obj will not be None here.
It's tested earlier in the same method.
parent
97efb118
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
19 deletions
+15
-19
product/ERP5Form/ListBox.py
product/ERP5Form/ListBox.py
+15
-19
No files found.
product/ERP5Form/ListBox.py
View file @
af519422
...
...
@@ -2275,28 +2275,24 @@ class ListBoxRendererLine:
original_value
=
getattr
(
brain
,
alias
)
processed_value
=
original_value
else
:
if
obj
is
not
None
:
try
:
# Get the trailing part.
try
:
# Get the trailing part.
try
:
property_id
=
sql
[
sql
.
rindex
(
'.'
)
+
1
:]
except
ValueError
:
property_id
=
sql
property_id
=
sql
[
sql
.
rindex
(
'.'
)
+
1
:]
except
ValueError
:
property_id
=
sql
try
:
original_value
=
obj
.
getProperty
(
property_id
,
_marker
)
if
original_value
is
_marker
:
raise
AttributeError
,
property_id
processed_value
=
original_value
except
AttributeError
:
original_value
=
getattr
(
obj
,
property_id
,
None
)
processed_value
=
original_value
except
(
AttributeError
,
KeyError
,
Unauthorized
):
original_value
=
None
processed_value
=
'Could not evaluate %s'
%
property_id
else
:
try
:
original_value
=
obj
.
getProperty
(
property_id
,
_marker
)
if
original_value
is
_marker
:
raise
AttributeError
,
property_id
processed_value
=
original_value
except
AttributeError
:
original_value
=
getattr
(
obj
,
property_id
,
None
)
processed_value
=
original_value
except
(
AttributeError
,
KeyError
,
Unauthorized
):
original_value
=
None
processed_value
=
'
Object does not exist'
processed_value
=
'
Could not evaluate %s'
%
property_id
# If the value is callable, evaluate it.
if
callable
(
original_value
):
...
...
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