Skip to content

Commit e704fde

Browse files
Fix primary subject selection if already present
1 parent c3edb08 commit e704fde

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/Certify.Models/Shared/Validation/CertificateEditorService.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,12 @@ public static ActionResult<ManagedCertificate> PopulateFromSiteInfo(ManagedCerti
6363

6464
foreach (var option in domainOptions)
6565
{
66+
if (managedCertificate.DomainOptions.Any(d => d.IsPrimaryDomain) && option.IsPrimaryDomain)
67+
{
68+
// clear automatic primary subject selection if we already have one
69+
option.IsPrimaryDomain = false;
70+
}
71+
6672
managedCertificate.DomainOptions.Add(option);
6773
}
6874

0 commit comments

Comments
 (0)