# HG changeset patch # User Denis Laxalde # Date 1517931109 -3600 # Node ID e9dd37ffa0764febde90b43bf11085fc0e49b733 # Parent 282bc6fb50fdc0ffcb6e324205389f27e5c7c7e2 [web] Fix UnboundLocalError about "exc" in ajax controller Introduced in 159dce89a145. diff -r 282bc6fb50fd -r e9dd37ffa076 cubicweb/web/views/ajaxcontroller.py --- a/cubicweb/web/views/ajaxcontroller.py Wed Feb 07 09:20:32 2018 +0100 +++ b/cubicweb/web/views/ajaxcontroller.py Tue Feb 06 16:31:49 2018 +0100 @@ -153,7 +153,7 @@ result = func(*args) except (RemoteCallFailed, DirectResponse): raise - except ValidationError: + except ValidationError as exc: raise RemoteCallFailed(exc_message(exc, self._cw.encoding), status=http_client.BAD_REQUEST) except Exception as exc: