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 #2095 (closed defect: fixed)

Opened 10 years ago

Last modified 10 years ago

DecoratedController methods do not get passed the arguments from routing

Reported by: percious Owned by: mramm
Priority: high Milestone: 2.0b3
Component: TurboGears Version: 1.9.x
Severity: normal Keywords:
Cc:

Description

Consider the following route:

map.connect('sample_metrics_edit', 'samples/metrics/:metric_id', controller='samplemetrics', action='edit', conditions=dict(method=GET?))

and the following associated controller method:

@expose() def edit(self, metric_id):

return dict()

One would expect that metric_id would be assigned the value from routes, but it is not.

Change History

comment:1 Changed 10 years ago by mramm

  • Priority changed from normal to highest

comment:2 Changed 10 years ago by mramm

  • Owner changed from faide to mramm

comment:3 Changed 10 years ago by mramm

  • Priority changed from highest to high

_perform_call was throwing away the params, only for DecoratedControllers?.

Not sure why this line was added, but I'm investigating in more depth.

Temporary fix commited in r6016.

Looks like this behavior was changed in r5856 to solve some other problem. I think the new fix should work even if validate is called twice as Chris suggests, but we need to track down the original problem.

Either way, this ticket is left open pending:

comment:4 Changed 10 years ago by mramm

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

Mailing list discussion confirms that the r6016 fix is working. Closing this issue for now.

comment:5 Changed 10 years ago by mramm

  • Milestone changed from 2.0b2 to 2.0b3
Note: See TracTickets for help on using tickets.