Once more, with formatting: Hi all, I have an edit form: class claimEditForm(form.EditForm): The object has a modify method, which looks like this: def modify(self, kw): The thing I don't understand is this: The invariant method I have in the interface is being called twice. First Pass through, object passed to my invariant is of type: FormData: <zope.formlib.form.FormData instance at 0x3f07c10> Call stack is: debug_call [publish.py:114] __call__ [form.py:773] update [form.py:740] handleSubmit [form.py:683] validate [form.py:720] checkInvariants [form.py:504] validateInvariants [interface.py:583] claimInvariants [interfaces.py:39] (In certain cases the data will be invalid, because I need to prep a few fields via claim._completeValues() ) Second Pass through, object passed to my invariant function is of type: claim: <as.claim.claim.claim object at 0x3591770> Call stack is: debug_call [publish.py:114] My question is: In order to not have the variants checked before my data is prepped, should I really be using a form.EditForm as the base, or some other class? Many thanks in advance, and a happy new year Adam |
_______________________________________________ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users