Skip to content

Commit

Permalink
Add current installation when reading mission runs
Browse files Browse the repository at this point in the history
  • Loading branch information
mrica-equinor committed Sep 20, 2024
1 parent f215ee9 commit 3fa99e6
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions backend/api/Services/MissionRunService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -301,6 +301,8 @@ private IQueryable<MissionRun> 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();
Expand Down

0 comments on commit 3fa99e6

Please sign in to comment.