mirror of
https://github.com/bitwarden/server.git
synced 2024-11-26 12:55:17 +01:00
null ref fix
This commit is contained in:
parent
d346ee5169
commit
ae48c8d9b5
@ -41,7 +41,7 @@ namespace Bit.Api.Controllers
|
||||
throw new UnauthorizedAccessException();
|
||||
}
|
||||
|
||||
var providers = user.GetTwoFactorProviders().Select(p => new TwoFactorProviderResponseModel(p.Key, p.Value));
|
||||
var providers = user.GetTwoFactorProviders()?.Select(p => new TwoFactorProviderResponseModel(p.Key, p.Value));
|
||||
return new ListResponseModel<TwoFactorProviderResponseModel>(providers);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user