This commit is contained in:
Николай 2023-04-01 21:29:48 +04:00
parent a31d5543ec
commit 74416a8aab

View File

@ -24,7 +24,7 @@ namespace HardwareShopContracts.StoragesContracts
public List<BuildViewModel> GetFilteredList(BuildSearchModel model)
{
if (!model.Id.HasValue)
if (!model.UserId.HasValue)
{
return new();
}
@ -52,7 +52,7 @@ namespace HardwareShopContracts.StoragesContracts
.ThenInclude(x => x.Component)
.Include(x => x.Comments)
.Include(x => x.User)
.Where(x => x.UserId == model.Id)
.Where(x => x.Id == model.Id)
.FirstOrDefault(x => (!string.IsNullOrEmpty(model.BuildName) && x.BuildName == model.BuildName) ||
(model.Id.HasValue && x.Id == model.Id))
?.GetViewModel;