Skip to content

Commit

Permalink
add status to response
Browse files Browse the repository at this point in the history
  • Loading branch information
Zhun Xu authored and Zhun Xu committed Oct 18, 2019
1 parent 4fc71c2 commit 2ff7329
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion python/seldon_core/wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,12 @@ def Predict():
requestJson = get_request()
logger.debug("REST Request: %s", request)
response = seldon_core.seldon_methods.predict(user_model, requestJson)
json_response = jsonify(response)
if response.status is not None and response.status.code is not None:
json_response.status_code = response.status.code

logger.debug("REST Response: %s", response)
return jsonify(response)
return json_response

@app.route("/send-feedback", methods=["GET", "POST"])
@app.route("/api/v0.1/feedback", methods=["POST"])
Expand Down

0 comments on commit 2ff7329

Please sign in to comment.