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 #2500 (closed defect: migrated)

Opened 9 years ago

Last modified 8 years ago

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

comment:2 Changed 9 years ago by mapleoin

  • Cc mapleoin@… added

comment:3 Changed 9 years ago by Chris Arndt

  • Description modified (diff)

comment:4 Changed 9 years ago by chrisz

  • Milestone changed from __unclassified__ to 2.1rc1

comment:5 Changed 9 years ago by percious

  • Status changed from new to assigned
  • Owner set to percious
  • Version changed from 2.0.3 to 2.1
  • Milestone changed from 2.1rc1 to 2.1

comment:6 Changed 8 years ago by pedersen

  • Status changed from assigned to closed
  • Resolution set to migrated
Note: See TracTickets for help on using tickets.