File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed
DigitalLearningSolutions.Web/Controllers/TrackingSystem/Delegates Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -163,7 +163,14 @@ public IActionResult Index(
163163 jobGroupId = Convert . ToInt32 ( filterValue ) ;
164164
165165 if ( filter . Contains ( "DelegateGroupId" ) )
166+ {
166167 groupId = Convert . ToInt32 ( filterValue ) ;
168+ if ( ! ( groups . Any ( g => g . Item1 == groupId ) ) )
169+ {
170+ groupId = null ;
171+ existingFilterString = FilterHelper . RemoveNonExistingFilterOptions ( availableFilters , existingFilterString ) ;
172+ }
173+ }
167174
168175 if ( filter . Contains ( "Answer1" ) )
169176 answer1 = filterValue ;
@@ -217,7 +224,7 @@ public IActionResult Index(
217224 customPrompts ,
218225 availableFilters
219226 ) ;
220-
227+
221228 model . TotalPages = ( int ) ( resultCount / itemsPerPage ) + ( ( resultCount % itemsPerPage ) > 0 ? 1 : 0 ) ;
222229 model . MatchingSearchResults = resultCount ;
223230
You can’t perform that action at this time.
0 commit comments