Commit 744d3bcf authored by Łukasz Nowak's avatar Łukasz Nowak

Avoid calling checkConsistency constraint providers.

They use the same method name to do another task: check consistency on passed
object. Thus it is impossible to check consistency on them.
parent 8b88d0a4
...@@ -54,6 +54,12 @@ ...@@ -54,6 +54,12 @@
from Products.CMFActivity.ActiveResult import ActiveResult\n from Products.CMFActivity.ActiveResult import ActiveResult\n
\n \n
constraint_message_list = []\n constraint_message_list = []\n
\n
if context.providesIConstraint():\n
# it is not possible to checkConsistency of Constraint itself, as method\n
# of this name implement consistency checking on object\n
return constraint_message_list\n
\n
traverse = context.getPortalObject().restrictedTraverse\n traverse = context.getPortalObject().restrictedTraverse\n
property_type_validity = PropertyTypeValidity(id=\'type_check\', description=\'Type Validity Check\')\n property_type_validity = PropertyTypeValidity(id=\'type_check\', description=\'Type Validity Check\')\n
\n \n
......
138 139
\ No newline at end of file \ No newline at end of file
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