F2 avanzada

This commit is contained in:
2026-08-10 23:00:56 -03:00
parent 12b7b0f4b2
commit b4b25e49e0
49 changed files with 1304 additions and 227 deletions
+2 -2
View File
@@ -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())
{