diff options
| author | LV-426 <lv-426@taproot.org.il> | 2015-01-26 13:51:49 +0200 |
|---|---|---|
| committer | LV-426 <lv-426@taproot.org.il> | 2015-01-26 13:51:49 +0200 |
| commit | 2298073e817922871c61a0fa2ee0ad043c474d43 (patch) | |
| tree | 0df03c8f5945d57789953777ec49b885c99a253c /src/server/rz_api_rest.py | |
| parent | 548a519d1216d0b789256221f9090895922d653b (diff) | |
diff_commit__attr: fix ctx being passed to validate_obj__attr_diff() rather than the kernel
Diffstat (limited to 'src/server/rz_api_rest.py')
| -rw-r--r-- | src/server/rz_api_rest.py | 6 |
1 files changed, 3 insertions, 3 deletions
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) |
