On Tue, 2010-12-07 at 17:06 +0100, Andreas Jung wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Chris McDonough wrote:
> > On Tue, 2010-12-07 at 15:18 +0100, Andreas Jung wrote:
> >> -----BEGIN PGP SIGNED MESSAGE-----
> >> Hash: SHA1
> >>
> >> My schema contains the following fields:
> >>
> >> 317     ust = colander.SchemaNode($
> >> 318         colander.Float(),$
> >> 319         title=u'Ust',$
> >> 320         missing=0,$
> >> 321         view_roles = [u'AutorenFiBu'],$
> >> 322         edit_roles = [u'AutorenFiBu'],$
> >> 323         edit_roles_on_creation = [u'AutorenFiBu'],$
> >> 324     )$
> >> 325     kreditor = colander.SchemaNode($
> >> 326         colander.Integer(),$
> >> 327         title=u'Kreditor',$
> >> 328         missing=0,$
> >> 329         view_roles = [u'Recherche', u'Anonymous', u'Authenticated',
> >> u'AutorenHOA'],$
> >> 330         edit_roles = [u'AutorenRed', u'AutorenFiBu'],$
> >> 331         edit_roles_on_creation = [u'AutorenRed', u'AutorenFiBu'],$
> >> 332     )$
> >>
> >> The related form data:
> >>
> >> 'fibu': {'bank': False,
> >>           'blz': False,
> >>           'kontonr': False,
> >>           'kreditor': 0,
> >>           'steuernr': False,
> >>           'steuerpflichtig': False,
> >>           'ust': 0},
> >>
> >> Upon deserialization I get the following error:
> >>
> >>   Module None, line 35, in deform_prepare
> >>    - <TrustedFSPythonScript at /Test/adb/deform_prepare>
> >>    - Line 35
> >>   Module colander, line 1338, in deserialize
> >>   Module colander, line 459, in deserialize
> >>   Module colander, line 441, in _impl
> >> Invalid: {'default.eintritt': u'Invalid date',
> >>  'default.geburtstag': u'Invalid date',
> >>  'fibu.kreditor': u'Required',
> >>  'fibu.ust': u'Required'}
> >>
> >>
> >> fibu.kreditor+ust are available ...so why is Colander complaining here
> >> with 'Required'?
> > 
> > Are you building the form "by hand" or letting Deform autogenerate it?
> 
> Auto-generated by deform.

Sounds like some sort of bug.  But I'm unable to repeat it.  I just
created this demonstration to try it:

http://deformdemo.repoze.org/nonrequired_number_fields/

Is there any way you can try to create a trimmed-down test that repeats
it?  The code that renders the above site is in "deformdemo" in the
Deform source and can be run via "paster serve demo.ini".  If you can
create something that has the issue in there, I can fix it.

- C


_______________________________________________
Repoze-dev mailing list
Repoze-dev@lists.repoze.org
http://lists.repoze.org/listinfo/repoze-dev

Reply via email to