Commit 995ba680 authored by Arnaud Fontaine's avatar Arnaud Fontaine

For per-document accessors generation, catch ValueError exceptions

when applying accessors from properties and only display a message in
the logs.

This exception is raised within the property documents when a property
is invalid (invalid type, category name, reference...)


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@43887 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent b2d239a7
......@@ -227,6 +227,11 @@ class PropertySheet(Folder):
property_definition_list.append(property_definition)
for property_definition in property_definition_list:
property_definition.applyOnAccessorHolder(accessor_holder,
expression_context,
portal)
try:
property_definition.applyOnAccessorHolder(accessor_holder,
expression_context,
portal)
except ValueError, e:
LOG("ERP5Type.Core.PropertySheet", INFO,
"Invalid property '%s' for Property Sheet '%s': %s" % \
(property_definition.getId(), self.getId(), str(e)))
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