When you have a DataController with a RelatedJoin column, it produces a
nice list of checkboxes on add/update forms for the user.  For the
proper sql to be produced, this list of checkboxes must be passed in to
DataController.create() as a python list. The problem occurrs with
multi-part/form-data encoded forms when the user selects *only one*
item from the list.  Now, create() sees a string instead of a list and
SQLObject spits out sql like: ...WHERE (run.id IN '2') instead of
...WHERE (run.id IN (('2'))) which won't execute.  This does not occur
with application/x-www-form-urlencoded encoded forms or when the user
selects two or more items.

This may be a CherryPy problem.  Or, providing a string instead of a
list when only one item is selected may be the correct behaviour for
lists of checkboxes.  If anyone is interested, I can provide more
details.  I'll be hacking my way around this tommorrow since I have a
form with a file upload and a RelatedJoin so I have to use
multi-part/form-data.


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TurboGears" 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
-~----------~----~----~----~------~----~------~--~---

Reply via email to