Fix tool update

This commit is contained in:
Lucio Maranta
2018-07-05 17:35:34 +02:00
parent 10ba0176c3
commit 28e65cbdda
3 changed files with 24 additions and 18 deletions
@@ -90,6 +90,13 @@ namespace Step.Controllers.WebApi
if (tool == null)
return NotFound();
if(tool.FamilyId != dtoTool.FamilyId)
{
// Check if family exists
NcFamilyModel fam = toolsManager.FindFamily(dtoTool.FamilyId);
if (fam == null)
return BadRequest(API_ERROR_KEYS.INCORRECT_PARAMETERS);
}
using (NcHandler ncHandler = new NcHandler())
{