Commit 67b83597 authored by Jérome Perrin's avatar Jérome Perrin

check consistency using constraints when validating an account


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@12643 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 5d146be5
......@@ -72,10 +72,13 @@
from Products.ERP5Type.Message import Message\n
\n
account = sci[\'object\']\n
N_ = lambda msgid: Message(\'erp5_uid\', msgid)\n
N_ = lambda msgid: Message(\'erp5_ui\', msgid)\n
\n
if account.getGap() in (None, \'\') : \n
if not account.getGap():\n
raise ValidationFailed(N_("GAP is unset."))\n
\n
for err in account.checkConsistency():\n
raise ValidationFailed(N(err[4]))\n
</string> </value>
</item>
<item>
......@@ -127,7 +130,9 @@ if account.getGap() in (None, \'\') : \n
<string>account</string>
<string>N_</string>
<string>_getattr_</string>
<string>None</string>
<string>_getiter_</string>
<string>err</string>
<string>N</string>
</tuple>
</value>
</item>
......
178
\ No newline at end of file
181
\ 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