From 3fa99e60f6153663037a5abb40630e2745327ab3 Mon Sep 17 00:00:00 2001 From: "Mariana R. Santos" Date: Fri, 20 Sep 2024 09:44:33 +0200 Subject: [PATCH] Add current installation when reading mission runs --- backend/api/Services/MissionRunService.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/backend/api/Services/MissionRunService.cs b/backend/api/Services/MissionRunService.cs index 2835016a..3386fad2 100644 --- a/backend/api/Services/MissionRunService.cs +++ b/backend/api/Services/MissionRunService.cs @@ -301,6 +301,8 @@ private IQueryable GetMissionRunsWithSubModels(bool readOnly = true) .Include(missionRun => missionRun.Tasks) .ThenInclude(task => task.Inspections) .ThenInclude(inspections => inspections.InspectionFindings) + .Include(missionRun => missionRun.Robot) + .ThenInclude(robot => robot.CurrentInstallation) .Where((m) => m.Area == null || accessibleInstallationCodes.Result.Contains(m.Area.Installation.InstallationCode.ToUpper())) .Where((m) => m.IsDeprecated == false); return readOnly ? query.AsNoTracking() : query.AsTracking();