From 27a86f5c189d6859ebf749b8f847ea78f29f7c89 Mon Sep 17 00:00:00 2001 From: e11it Date: Tue, 3 Mar 2020 21:45:33 +0300 Subject: [PATCH] Fix: San values #2921 Not sure is it correct solution --- lemur/certificates/schemas.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lemur/certificates/schemas.py b/lemur/certificates/schemas.py index 8f15542d..bc7ff1b0 100644 --- a/lemur/certificates/schemas.py +++ b/lemur/certificates/schemas.py @@ -146,7 +146,9 @@ class CertificateInputSchema(CertificateCreationSchema): data["extensions"]["subAltNames"] = {"names": []} elif not data["extensions"]["subAltNames"].get("names"): data["extensions"]["subAltNames"]["names"] = [] - data["extensions"]["subAltNames"]["names"] += csr_sans + + if not data["extensions"]["subAltNames"]["names"]: + data["extensions"]["subAltNames"]["names"] += csr_sans return missing.convert_validity_years(data)