online fixes for ruby

This commit is contained in:
uwsgi
2017-02-11 12:48:30 +01:00
parent 621e1ca1ad
commit 49ac42b9a5
8 changed files with 65 additions and 45 deletions

View File

@@ -70,4 +70,8 @@ def delete(id):
@organization_pages.route(".json",methods=['POST'])
def create():
organization,errors=controller.create(request)
return jsonify(organization=organization,errors=errors)
if len(errors)>0:
http_code=422
else:
http_code=200
return jsonify(organization=organization,errors=errors), http_code