# HG changeset patch # User Sylvain Thénault # Date 1258391451 -3600 # Node ID f9778a00e47f0282e911f33426e174c026251ba2 # Parent 2fee9151c6b2362a761b574b754ad688236b31ed actually fix rgx_action diff -r 2fee9151c6b2 -r f9778a00e47f web/views/urlrewrite.py --- a/web/views/urlrewrite.py Mon Nov 16 17:51:45 2009 +0100 +++ b/web/views/urlrewrite.py Mon Nov 16 18:10:51 2009 +0100 @@ -149,10 +149,11 @@ def rgx_action(rql=None, args=None, cachekey=None, argsgroups=(), setuser=False, form=None, formgroups=(), transforms={}, controller=None): - def do_build_rset(inputurl, uri, req, schema): + def do_build_rset(inputurl, uri, req, schema, + cachekey=cachekey # necessary to avoid UnboundLocalError + ): if rql: kwargs = args and args.copy() or {} - cachekey = cachekey # necessary to avoid UnboundLocalError if argsgroups: if cachekey is not None and isinstance(cachekey, basestring): cachekey = (cachekey,) @@ -163,7 +164,7 @@ kwargs[key] = transforms[key](value) except KeyError: kwargs[key] = value - if key in cachekey: + if cachekey is not None and key in cachekey: kwargs[key] = typed_eid(value) if setuser: kwargs['u'] = req.user.eid