Ticket #2500 (closed defect: migrated)
TG2.x RestController nested controller delete function raises exception
| Reported by: | ozwyzard | Owned by: | percious |
|---|---|---|---|
| Priority: | normal | Milestone: | 2.1 |
| Component: | TurboGears | Version: | 2.1 |
| Severity: | normal | Keywords: | |
| Cc: | mapleoin@… |
Description (last modified by Chris Arndt) (diff)
I was able to track down to what seems like a bug in TG2 RestController?. The delete operation does not seem to work on nested controllers. With the following fix, it works.
582c582,583 < elif remainder_len >=2 and (method == 'post' or method == 'put') and hasattr(obj, 'get_one'): --- > ##### elif remainder_len >=2 and (method == 'post' or method == 'put') and hasattr(obj, 'get_one'): > elif remainder_len >=2 and (method == 'post' or method == 'put' or method == 'delete') and hasattr(obj, 'get_one'):
Hope this helps! It would be great if a TG2 developer can confirm this bug (and fix).
The file with the purported bug/fix:
tg/controllers.py
http://groups.google.com/group/turbogears/browse_thread/thread/5a0338fd58e020a9
Thanks! ozwyzard
Change History
Note: See
TracTickets for help on using
tickets.