File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -47,7 +47,12 @@ public ActionResult Index()
4747 return NotFound ( "Could not find user" ) ;
4848 }
4949
50- var invites = db . OrganisationInvites . Where ( uc => uc . InviteEmail . ToLower ( ) == CurrentUser . Email . ToLower ( ) && uc . AcceptedOn == null && uc . RejectedOn == null ) ;
50+ var invites = db
51+ . OrganisationInvites
52+ . Include ( c => c . CreatedBy )
53+ . Where ( uc => uc . AcceptedOn == null && uc . RejectedOn == null )
54+ . ToList ( )
55+ . Where ( uc => string . Compare ( uc . InviteEmail , CurrentUser . Email , StringComparison . OrdinalIgnoreCase ) == 0 ) ;
5156
5257 if ( invites . Any ( ) == false )
5358 {
@@ -57,9 +62,7 @@ public ActionResult Index()
5762
5863 List < InvitationViewModel > viewModels = new List < InvitationViewModel > ( ) ;
5964
60- foreach ( var orgGrp in invites
61- . Include ( c => c . CreatedBy )
62- . GroupBy ( c => c . OrganisationId ) )
65+ foreach ( var orgGrp in invites . GroupBy ( c => c . OrganisationId ) )
6366 {
6467 InvitationViewModel viewModel = new InvitationViewModel
6568 {
You can’t perform that action at this time.
0 commit comments