[FIX] allow to use "dbname" as keyword in routes
bzr revid: chs@openerp.com-20140131163139-89lfordriamw9i1w
This commit is contained in:
parent
059715b348
commit
46cbf22efb
|
@ -208,7 +208,7 @@ class WebRequest(object):
|
||||||
args = (request,) + args
|
args = (request,) + args
|
||||||
# Correct exception handling and concurency retry
|
# Correct exception handling and concurency retry
|
||||||
@service_model.check
|
@service_model.check
|
||||||
def checked_call(dbname, *a, **kw):
|
def checked_call(___dbname, *a, **kw):
|
||||||
return self.func(*a, **kw)
|
return self.func(*a, **kw)
|
||||||
|
|
||||||
# FIXME: code and rollback management could be cleaned
|
# FIXME: code and rollback management could be cleaned
|
||||||
|
|
|
@ -40,9 +40,10 @@ def dispatch(method, params):
|
||||||
|
|
||||||
def check(f):
|
def check(f):
|
||||||
@wraps(f)
|
@wraps(f)
|
||||||
def wrapper(dbname, *args, **kwargs):
|
def wrapper(___dbname, *args, **kwargs):
|
||||||
""" Wraps around OSV functions and normalises a few exceptions
|
""" Wraps around OSV functions and normalises a few exceptions
|
||||||
"""
|
"""
|
||||||
|
dbname = ___dbname # NOTE: this forbid to use "___dbname" as arguments in http routes
|
||||||
|
|
||||||
def tr(src, ttype):
|
def tr(src, ttype):
|
||||||
# We try to do the same as the _(), but without the frame
|
# We try to do the same as the _(), but without the frame
|
||||||
|
|
Loading…
Reference in New Issue