Skip to content

Commit a99e6b6

Browse files
fix: use List<GrantDetails> fallback in Grants page (CS0019)
Agent-Logs-Url: https://github.com/TransactionProcessing/SecurityService/sessions/30e75bb9-e03f-4316-8eb1-6aaf9f516ad3 Co-authored-by: StuartFerguson <16325469+StuartFerguson@users.noreply.github.com>
1 parent aa1800f commit a99e6b6

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

SecurityService/Pages/Account/Grants/Index.cshtml.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ public async Task<IActionResult> OnGetAsync(CancellationToken cancellationToken)
3333
}
3434

3535
var result = await this._mediator.Send(new SecurityServiceQueries.GetUserGrantsQuery(user.Id), cancellationToken);
36-
this.Grants = result.Data ?? Array.Empty<GrantDetails>();
36+
this.Grants = result.Data ?? new List<GrantDetails>();
3737
return this.Page();
3838
}
3939

@@ -50,7 +50,7 @@ public async Task<IActionResult> OnPostRevokeAsync(string authorizationId, Cance
5050
{
5151
this.StatusMessage = result.Message ?? "The grant could not be revoked.";
5252
var grantsResult = await this._mediator.Send(new SecurityServiceQueries.GetUserGrantsQuery(user.Id), cancellationToken);
53-
this.Grants = grantsResult.Data ?? Array.Empty<GrantDetails>();
53+
this.Grants = grantsResult.Data ?? new List<GrantDetails>();
5454
return this.Page();
5555
}
5656

0 commit comments

Comments
 (0)