Changed error format on template subject duplication error

This commit is contained in:
Martyn Inglis
2016-02-22 14:32:41 +00:00
parent b3b3cca65f
commit dbe914f401
2 changed files with 2 additions and 2 deletions

View File

@@ -44,7 +44,7 @@ def create_template(service_id):
message = "Failed to create template"
if "templates_subject_key" in str(ex):
message = 'Duplicate template subject'
return jsonify(result="error", message=message), 400
return jsonify(result="error", message=[{'subject': message}]), 400
return jsonify(result="error", message=message), 500
return jsonify(data=template_schema.dump(new_template).data), 201