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) if (model == null)
return null; return null;
foreach (var Ship in source.Ships) var ship = source.Ships.FirstOrDefault(x => x.Id == model.Id);
{ if (ship != null)
if (Ship.Id == model.ShipId) model.ShipName = ship.ShipName;
{
model.ShipName = Ship.ShipName;
break;
}
}
return model; return model;
} }
} }