diff --git a/app/template/template_category_rest.py b/app/template/template_category_rest.py index f987ef3243..84b8f06bd6 100644 --- a/app/template/template_category_rest.py +++ b/app/template/template_category_rest.py @@ -95,10 +95,10 @@ def delete_template_category(template_category_id): if request.args.get("cascade") == "True": dao_delete_template_category_by_id(template_category_id, cascade=True) - return "", 200 + return "", 204 if Template.query.filter_by(template_category_id=template_category_id).count() > 0: return jsonify(message="Cannot delete a template category with templates assigned to it."), 400 else: dao_delete_template_category_by_id(template_category_id) - return "", 200 + return "", 204 diff --git a/tests/app/template/test_template_category_rest.py b/tests/app/template/test_template_category_rest.py index 9cb686bc6e..37ce63fa74 100644 --- a/tests/app/template/test_template_category_rest.py +++ b/tests/app/template/test_template_category_rest.py @@ -118,7 +118,7 @@ def test_get_template_categories( @pytest.mark.parametrize( "cascade, expected_status_code, expected_msg", [ - ("True", 200, ""), + ("True", 204, ""), ("False", 400, "Cannot delete a template category with templates assigned to it."), ], )