Menu

#48 TG2.x RestController nested controller delete function raises exception

2.1.1
closed
nobody
core
defect
normal
core
2.1.0
2014-01-08
2011-03-28
No

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

Discussion

Auth0 Logo