[CHG] **kw don't prevent url searching/listing anymore
After discussion and addition of support for the methods parameter (on
@route), it's been determined that:
* POST endpoint must set up method correctly
* **kw on GET endpoints must be completely optional, mandatory query
arguments should be added as formal parameters without a default
values
* URLs can thus be generated for methods with **kw, simply by ignoring
it entirely
bzr revid: xmo@openerp.com-20131119154254-vp0zfnzjvi451vv0
This commit is contained in:
@@ -318,9 +318,8 @@ class website(osv.osv):
|
||||
# If this is ever ported to py3, use signatures, it doesn't suck as much
|
||||
spec = inspect.getargspec(undecorated_func)
|
||||
|
||||
# if *args or **kwargs, just bail the fuck out, only dragons can
|
||||
# live there
|
||||
if spec.varargs or spec.keywords:
|
||||
# if *args bail the fuck out, only dragons can live there
|
||||
if spec.varargs:
|
||||
return False
|
||||
|
||||
# remove all arguments with a default value from the list
|
||||
|
||||
Reference in New Issue
Block a user