RestController nesting bug?

2 views
Skip to first unread message

ozwyzard

unread,
Aug 23, 2010, 11:00:18 PM8/23/10
to TurboGears
I was able to track down to what seems like a bug in TG2. 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).

For an old thread discussing nested REST controller, kindly refer to
http://groups.google.com/group/turbogears/browse_thread/thread/47ecba39f1e2f9c4/22014d75378809b0

Thanks!
ozwyzard


ozwyzard

unread,
Aug 23, 2010, 11:02:20 PM8/23/10
to TurboGears
Forgot to mention the file with the purported bug/fix:

.../virtual_environs/tg2env/lib/python2.5/site-packages/
TurboGears2-2.0.3-py2.5.egg/tg/controllers.py

Thanks!
ozwyzard
> For an old thread discussing nested REST controller, kindly refer tohttp://groups.google.com/group/turbogears/browse_thread/thread/47ecba...
>
> Thanks!
> ozwyzard

Christoph Zwerschke

unread,
Aug 24, 2010, 3:19:33 AM8/24/10
to turbo...@googlegroups.com
Am 24.08.2010 05:00, schrieb ozwyzard:
> Hope this helps! It would be great if a TG2 developer can confirm
> this bug (and fix).

Chances are better it you open a ticket for that at
http://trac.turbogears.org
When posting only on the mailing list error reposts tend to be forgotten
if nobody has time at the moment.

- Christoph

ozwyzard

unread,
Aug 24, 2010, 8:38:10 PM8/24/10
to TurboGears
Thanks Christoph. I opened a Trac account and submitted the defect:

http://trac.turbogears.org/ticket/2500

- ozwyzard

On Aug 24, 3:19 am, Christoph Zwerschke <c...@online.de> wrote:
> Am 24.08.2010 05:00, schrieb ozwyzard:
>
> Chances are better it you open a ticket for that athttp://trac.turbogears.org
Reply all
Reply to author
Forward
0 new messages