Skip to content

Commit

Permalink
Temporarily reintroduce the null propagation operators in Application…
Browse files Browse the repository at this point in the history
…Controller to unblock CI builds
  • Loading branch information
kevinchalet committed Jan 10, 2019
1 parent 87f7f7c commit 3bd601f
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ public async Task<IActionResult> Create(string returnUrl = null)

var model = new CreateOpenIdApplicationViewModel();

var roleService = HttpContext.RequestServices.GetService<IRoleService>();
var roleService = HttpContext.RequestServices?.GetService<IRoleService>();
if (roleService != null)
{
foreach (var role in await roleService.GetRoleNamesAsync())
Expand Down Expand Up @@ -250,7 +250,7 @@ public async Task<IActionResult> Edit(string id, string returnUrl = null)
Type = await _applicationManager.GetClientTypeAsync(application)
};

var roleService = HttpContext.RequestServices.GetService<IRoleService>();
var roleService = HttpContext.RequestServices?.GetService<IRoleService>();
if (roleService != null)
{
foreach (var role in await roleService.GetRoleNamesAsync())
Expand Down

0 comments on commit 3bd601f

Please sign in to comment.