исправил ошибку из PR

This commit is contained in:
dyakonovr 2024-04-12 21:08:39 +04:00
parent 39b607df29
commit 2424828f2e

View File

@ -92,12 +92,9 @@ namespace SoftwareInstallationFileImplement.Implements
}
private OrderViewModel GetPackageName(OrderViewModel viewModel)
{
foreach (var package in source.Packages)
{
if (package.Id == viewModel.PackageId)
{
viewModel.PackageName = package.PackageName;
}
var package = source.Packages.FirstOrDefault(x => x.Id == viewModel.PackageId);
if (package != null) {
viewModel.PackageName = package.PackageName;
}
return viewModel;
}