You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@allura.apache.org by br...@apache.org on 2019/03/27 21:03:19 UTC

[allura] 08/08: [#8273] Upgrade TG 2.3.1

This is an automated email from the ASF dual-hosted git repository.

brondsem pushed a commit to branch db/8273
in repository https://gitbox.apache.org/repos/asf/allura.git

commit c61442ac5718623a317e7846e0d0d36baabd98d6
Author: Dave Brondsema <da...@brondsema.net>
AuthorDate: Fri Mar 22 18:06:56 2019 -0400

    [#8273] Upgrade TG 2.3.1
---
 Allura/allura/lib/helpers.py | 5 +++--
 requirements.txt             | 2 +-
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/Allura/allura/lib/helpers.py b/Allura/allura/lib/helpers.py
index 57f200d..5b2fe56 100644
--- a/Allura/allura/lib/helpers.py
+++ b/Allura/allura/lib/helpers.py
@@ -594,9 +594,10 @@ def render_genshi_plaintext(template_name, **template_vars):
 
 @tg.expose(content_type='text/plain')
 def json_validation_error(controller, **kwargs):
+    exc = request.validation['exception']
     result = dict(status='Validation Error',
-                  errors=c.validation_exception.unpack_errors(),
-                  value=c.validation_exception.value,
+                  errors={fld: str(err) for fld, err in exc.error_dict.iteritems()},
+                  value=exc.value,
                   params=kwargs)
     response.status = 400
     return json.dumps(result, indent=2)
diff --git a/requirements.txt b/requirements.txt
index 6c6de7d..11aa5da 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -49,7 +49,7 @@ textile==2.1.5
 # dep of colander
 translationstring==0.4
 TimerMiddleware==0.4.4
-TurboGears2==2.3.0
+TurboGears2==2.3.1
 # dep of html5lib
 webencodings==0.5.1
 WebOb==1.3.1