F2 avanzada
This commit is contained in:
@@ -117,7 +117,7 @@ namespace vita_asistente.Controllers
|
||||
// Pero primero verificamos si tiene usuarios asignados
|
||||
using var scope = HttpContext.RequestServices.CreateScope();
|
||||
var userManager = scope.ServiceProvider.GetRequiredService<UserManager<ApplicationUser>>();
|
||||
var usersInRole = await userManager.GetUsersInRoleAsync(role.Name);
|
||||
var usersInRole = await userManager.GetUsersInRoleAsync(role.Name ?? string.Empty);
|
||||
|
||||
if (usersInRole.Any())
|
||||
{
|
||||
@@ -157,7 +157,7 @@ namespace vita_asistente.Controllers
|
||||
// Verificar que no tenga usuarios asignados
|
||||
using var scope = HttpContext.RequestServices.CreateScope();
|
||||
var userManager = scope.ServiceProvider.GetRequiredService<UserManager<ApplicationUser>>();
|
||||
var usersInRole = await userManager.GetUsersInRoleAsync(role.Name);
|
||||
var usersInRole = await userManager.GetUsersInRoleAsync(role.Name ?? string.Empty);
|
||||
|
||||
if (usersInRole.Any())
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user