Skip to content

Commit f5d65cc

Browse files
authored
MMI-3407 Fix Report Dashboard (#2552)
1 parent 25f8328 commit f5d65cc

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

libs/net/dal/Services/ReportService.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,11 @@ public IEnumerable<Report> GetDashboard(DashboardFilter filter)
165165
.AsNoTracking()
166166
.Include(r => r.Owner)
167167
.Include(r => r.Events).ThenInclude(e => e.Schedule)
168+
.Where(r => this.Context.ReportInstances
169+
.Where(ri => ri.ReportId == r.Id)
170+
.OrderByDescending(ri => ri.Id)
171+
.Select(ri => ri.Status)
172+
.FirstOrDefault() != ReportStatus.Pending)
168173
.AsQueryable();
169174

170175
if (filter.IsEnabled.HasValue)
@@ -206,6 +211,7 @@ public IEnumerable<Report> GetDashboard(DashboardFilter filter)
206211
var instances = (
207212
from ri in this.Context.ReportInstances
208213
where reportIds.Contains(ri.ReportId)
214+
&& ri.Status != ReportStatus.Pending
209215
group ri by ri.ReportId into rig
210216
select rig.OrderByDescending(ri => ri.Id).Take(2))
211217
.AsNoTracking()

0 commit comments

Comments
 (0)