@@ -33,14 +33,14 @@ public async Task<Result<long>> CreateOrUpdateCourseFilter(CreateCourseFilterMod
3333 var filter = CourseFilterUtils . CreateFilter ( courseFilterModel ) ;
3434
3535 var existingCourseFilter =
36- await _courseFilterRepository . GetAsync ( courseFilterModel . UserId , courseFilterModel . CourseId ) ;
36+ await _courseFilterRepository . GetAsync ( courseFilterModel . Id , courseFilterModel . CourseId ) ;
3737 if ( existingCourseFilter != null )
3838 {
3939 await UpdateAsync ( existingCourseFilter . Id , filter ) ;
4040 return Result < long > . Success ( existingCourseFilter . Id ) ;
4141 }
4242
43- var filterId = await AddCourseFilter ( filter , courseFilterModel . CourseId , courseFilterModel . UserId ) ;
43+ var filterId = await AddCourseFilter ( filter , courseFilterModel . CourseId , courseFilterModel . Id ) ;
4444 if ( filterId == - 1 )
4545 {
4646 return Result < long > . Failed ( ) ;
@@ -86,7 +86,7 @@ public async Task<CourseDTO> ApplyFilter(CourseDTO course, string userId)
8686
8787 var courseFilters =
8888 ( await _courseFilterRepository . GetAsync ( findFiltersFor , course . Id ) )
89- . ToDictionary ( x => x . UserId , x => x . CourseFilter ) ;
89+ . ToDictionary ( x => x . Id , x => x . CourseFilter ) ;
9090
9191 if ( ! isMentor )
9292 {
@@ -126,7 +126,7 @@ public async Task<MentorToAssignedStudentsDTO[]> GetAssignedStudentsIds(long cou
126126 . Where ( u => u . CourseFilter . Filter . HomeworkIds . Count == 0 )
127127 . Select ( u => new MentorToAssignedStudentsDTO
128128 {
129- MentorId = u . UserId ,
129+ MentorId = u . Id ,
130130 SelectedStudentsIds = u . CourseFilter . Filter . StudentIds
131131 } )
132132 . ToArray ( ) ;
@@ -208,7 +208,7 @@ public async Task UpdateGroupFilters(long courseId, long homeworkId, IEnumerable
208208 {
209209 var filterIds = studentIds . Union ( new [ ] { GlobalFilterUserId } ) . ToArray ( ) ;
210210 var filters = ( await _courseFilterRepository . GetAsync ( filterIds , courseId ) )
211- . ToDictionary ( x => x . UserId , x => x . CourseFilter ) ;
211+ . ToDictionary ( x => x . Id , x => x . CourseFilter ) ;
212212
213213 foreach ( var filterId in filterIds )
214214 {
0 commit comments