Skip to content

Commit

Permalink
StudentPicker - padá na NullReferenceException
Browse files Browse the repository at this point in the history
  • Loading branch information
hakenr committed May 27, 2024
1 parent 080f876 commit b8c3845
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Web.Client/Components/Pickers/StudentPicker.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ private async Task<AutosuggestDataProviderResult<StudentReferenceDto>> GetSugges
Data = data
.Where(c => !c.IsDeleted)
.Where(c => RegexPatterns.IsWildcardMatch("*" + request.UserInput + "*", c.Name))
.OrderBy(c => c.LastName.StartsWith(request.UserInput, StringComparison.OrdinalIgnoreCase) ? 0 : 1)
.OrderBy(c => (c.LastName?.StartsWith(request.UserInput, StringComparison.OrdinalIgnoreCase) ?? false) ? 0 : 1)
.ThenBy(c => c.LastName)
.ThenBy(c => c.Name)
.Take(5)
Expand Down

0 comments on commit b8c3845

Please sign in to comment.