diff --git a/Cervantes.Web/Controllers/UserController.cs b/Cervantes.Web/Controllers/UserController.cs index a767262..e95a871 100644 --- a/Cervantes.Web/Controllers/UserController.cs +++ b/Cervantes.Web/Controllers/UserController.cs @@ -123,6 +123,10 @@ public async Task GetRole(string userId) var user2 = usrManager.GetByUserId(userId); var rolUser = await authUsersAdminService.FindAuthUserByUserIdAsync(user2.Id); + if (rolUser.Result == null) + { + return String.Empty; + } var test = rolUser.Result.UserRoles; if (test.Count == 0)