1
0
mirror of https://github.com/bitwarden/server.git synced 2025-01-22 21:51:22 +01:00

Fix null ref exception for new org SSO (#963)

This commit is contained in:
Chad Scharf 2020-10-08 13:49:05 -04:00 committed by GitHub
parent 9848f12638
commit bf04b9f940
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View File

@ -47,7 +47,7 @@ namespace Bit.Portal.Controllers
}
var ssoConfig = await _ssoConfigRepository.GetByOrganizationIdAsync(orgId.Value);
var model = new SsoConfigEditViewModel(ssoConfig, _i18nService, _globalSettings);
var model = new SsoConfigEditViewModel(ssoConfig, orgId.Value, _i18nService, _globalSettings);
return View(model);
}

View File

@ -18,8 +18,8 @@ namespace Bit.Portal.Models
{
public SsoConfigEditViewModel() { }
public SsoConfigEditViewModel(SsoConfig ssoConfig, II18nService i18nService,
GlobalSettings globalSettings)
public SsoConfigEditViewModel(SsoConfig ssoConfig, Guid organizationId,
II18nService i18nService, GlobalSettings globalSettings)
{
if (ssoConfig != null)
{
@ -41,7 +41,7 @@ namespace Bit.Portal.Models
configurationData = new SsoConfigurationData();
}
Data = new SsoConfigDataViewModel(configurationData, globalSettings, ssoConfig.OrganizationId);
Data = new SsoConfigDataViewModel(configurationData, globalSettings, organizationId);
BuildLists(i18nService);
}