#721: Problems with Schema validation
-------------------------------------------+--------------------------------
Reporter: Baruch <[EMAIL PROTECTED]> | Owner: anonymous
Type: defect | Status: reopened
Priority: high | Milestone: 0.9a4
Component: Widgets | Version: 0.9a3
Severity: normal | Resolution:
Keywords: |
-------------------------------------------+--------------------------------
Comment (by Alberto):
I've traced the cause to line 374 of controllers.py:
{{{
# Remove any non-request-params from value
tg_util.remove_keys(value, ifilterfalse(
cherrypy.request.params.has_key,
kw.iterkeys()))
}}}
However, I'm not sure ATM how to proceed. Excess args need to be removed
in order to validate the form (or else 'self' and 'tg_errors' will get in
the form and validation will fail miserably). However, if
cherrypy.request.params is empty all defaults you provide at the method's
signature will be wiped out.
This is certainly a bug. IIRC there was some discussion a while ago on how
we should handle method's default args but I can't remember right now (too
lazy ;) what was done about it. I'm pinging Simon and Michele too see if
they can shed some light on this before I take a closer look.
Thanks for reporting this.
Alberto.
--
Ticket URL: <http://trac.turbogears.org/turbogears/ticket/721>
TurboGears <http://www.turbogears.org/>
TurboGears front-to-back web development
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"TurboGears Tickets" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/turbogears-tickets
-~----------~----~----~----~------~----~------~--~---