Commit 7c0d1ac4 authored by Vincent Pelletier's avatar Vincent Pelletier

If brain is the same as obj, it's better to grab values using accessors,...

If brain is the same as obj, it's better to grab values using accessors, instead of reading brain attributes (this solves discrepancies between what a listbox displays and what the accessor computes on a document).
In the process, replace a hasattr by a getattr.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@20540 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 9499ef06
......@@ -1940,7 +1940,7 @@ class ListBoxRendererLine:
# If a tales expression is not defined, get a skin, an accessor or a property.
if not tales:
if hasattr(aq_self(brain), alias):
if brain is not obj and getattr(aq_self(brain), alias, None) is not None:
original_value = getattr(brain, alias)
processed_value = original_value
elif obj is not None:
......
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