Warning: Can't synchronize with repository "(default)" (Unsupported version control system "svn": No module named svn). Look in the Trac log for more information.

Ticket #1042 (closed task: fixed)

Opened 13 years ago

Last modified 12 years ago

Initial invalid form data adjust_value bug

Reported by: Andy Kilner Owned by: alberto
Priority: normal Milestone:
Component: TG Widgets Version: 0.9a6
Severity: normal Keywords:
Cc:

Description

When rendering/displaying a form such as a TableForm?, an invalid value for one of the fields will cause the value for all other fields in that form to be set to the string representation of the value dict.

The problem appears to be here: http://trac.turbogears.org/turbogears/browser/branches/1.0/turbogears/widgets/forms.py?rev=1685#L221

An exception is raised for the invalid value but it is caught and passes away silently by casting the value to a str, which is probably correct behaviour for a non-compound widget but makes no sense for forms where the value is a dictionary of values.

Attachments

controllers.py Download (493 bytes) - added by Andy Kilner 13 years ago.
Example controller showing the bug

Change History

Changed 13 years ago by Andy Kilner

Example controller showing the bug

comment:1 Changed 13 years ago by alberto

  • Owner changed from anonymous to alberto

This should be fixed... Jorge and I lost a couple of hours (and lots of hair ;) ) chasing a bug which was obscured by this behavior when implementing the SelectShuttle?....

Alberto

comment:2 Changed 13 years ago by alberto

  • Status changed from new to closed
  • Resolution set to fixed

This should be fixed in [1736]

Note: See TracTickets for help on using tickets.