Fix available shank

This commit is contained in:
Lucio Maranta
2018-08-27 14:13:24 +02:00
parent 0b435442e8
commit 40092716bb
2 changed files with 5 additions and 11 deletions
@@ -231,7 +231,7 @@ namespace Step.Database.Controllers
public List<DbNcToolModel> GetMountedTools()
{
List<DbNcToolModel> tools = FindToolsWithDependencies()
.Where(x => x.Shank.MagazineId != null)
.Where(x => x.Shank != null && x.Shank.MagazineId != null)
.ToList();
return tools;
@@ -246,7 +246,7 @@ namespace Step.Database.Controllers
return dtoShanks;
}
public List<DTONcShankModel> GetAvailableShanksWithoutChilds()
public List<DTONcShankModel> GetAvailableShanksWithChilds()
{
List<DTONcShankModel> dtoShanks = GetShanks()
.Where(x => x.MagazineId == null && x.ChildsTools.Count > 0)