Fix tool update
This commit is contained in:
@@ -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())
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user