Update 'ShipyardFileImplement/OrderStorage.cs'

This commit is contained in:
Ivan_Starostin 2024-06-02 17:09:48 +04:00
parent ad9462f7dc
commit 2f411f36b8

View File

@ -84,14 +84,9 @@ namespace ShipyardFileImplement.Implements
{
if (model == null)
return null;
foreach (var Ship in source.Ships)
{
if (Ship.Id == model.ShipId)
{
model.ShipName = Ship.ShipName;
break;
}
}
var ship = source.Ships.FirstOrDefault(x => x.Id == model.Id);
if (ship != null)
model.ShipName = ship.ShipName;
return model;
}
}