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 #2461: TurboGears2-py24-ternary.patch

File TurboGears2-py24-ternary.patch, 845 bytes (added by lmacken, 2 years ago)

TurboGears2-py24-ternary.patch -- untestsed patch

  • tg/controllers/restcontroller.py

    diff -r 5de6b2ca7c19 tg/controllers/restcontroller.py
    a b  
    134134            return self._dispatch_controller(current_path, current_controller, state, remainder[1:]) 
    135135 
    136136        if self._is_exposed(current_controller, 'get_one') or self._is_exposed(current_controller,  'get'): 
    137             method = current_controller.get_one if self._is_exposed(current_controller, 'get_one') else current_controller.get 
     137            method = self._is_exposed(current_controller, 'get_one') and current_controller.get_one or current_controller.get 
    138138            if method and self._method_matches_args(method, state, remainder): 
    139139                state.add_method(method, remainder) 
    140140                return state