On the EndPoint POST /projects, when the parameter template_id is equal to 1, the response code is 500 and the project appear on the "pending project" list of the administration panel.
Instead of this, the response code should be 400 and the message: "Template #1 is not valid" should be returned.
The request used to reproduce:
curl -X POST --header 'Content-Type: application/json' --header 'Accept: text/html' -d '{
"shortname": "string",
"description": "string",
"label": "string",
"is_public": true,
"template_id": 1
}' '
https://localhost/api/projects'