Ticket #1820 (closed defect: fixed)

Opened 2 months ago

Last modified 2 months ago

crud list produces error NoSuchColumnError for some tables

Reported by: dakila Assigned to: anonymous
Priority: normal Milestone: __unclassified__
Component: TurboGears Version: trunk
Severity: normal Keywords: crud, dbsprockets
Cc:

Description

to reproduce NoSuchColumnError? creating a quickstarted project in tg2 and running crud for model User which has a many to many relation to Group will produce the traceback error when accessed via browser, in this case it will output a traceback

NoSuchColumnError: "Could not locate column in row for column
'tg_groups'"

the select method by provider does not take into account the table dependency, however the associated widget will look for the tg_group resulting in the error above. This can be partially resolved by using the getTableValue method instead of provider.select

Attachments

crud_controller.py_tmpl.diff (0.6 kB) - added by dakila on 05/15/08 01:14:02.
small patch to use the getTableValue

Change History

05/15/08 01:14:02 changed by dakila

  • attachment crud_controller.py_tmpl.diff added.

small patch to use the getTableValue

05/25/08 04:45:26 changed by dakila

  • status changed from new to closed.
  • resolution set to fixed.

Fixed in r4590