From 2298073e817922871c61a0fa2ee0ad043c474d43 Mon Sep 17 00:00:00 2001 From: LV-426 Date: Mon, 26 Jan 2015 13:51:49 +0200 Subject: diff_commit__attr: fix ctx being passed to validate_obj__attr_diff() rather than the kernel --- src/server/rz_api_rest.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/server/rz_api_rest.py') diff --git a/src/server/rz_api_rest.py b/src/server/rz_api_rest.py index 21c92b58..29998128 100644 --- a/src/server/rz_api_rest.py +++ b/src/server/rz_api_rest.py @@ -85,16 +85,16 @@ def diff_commit__attr(): # handle DB ERRORS, eg. name attr change error return common_resp_handle(error='error occurred') - ctx = __context__common() try: attr_diff = sanitize_input(request) - validate_obj__attr_diff(attr_diff, ctx) + validate_obj__attr_diff(attr_diff) except Exception as e: return common_resp_handle(error='malformed input') + ctx = __context__common() try: kernel = flask.current_app.kernel - _, commit_ret = kernel.diff_commit__attr(attr_diff) + _, commit_ret = kernel.diff_commit__attr(attr_diff, ctx) return common_resp_handle(data=commit_ret) except Exception as e: log.error(e.message) -- cgit v1.3.1