File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed
Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff 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 ( )
You can’t perform that action at this time.
0 commit comments