diff --git a/lemur/certificates/schemas.py b/lemur/certificates/schemas.py index 1352f796..b807c760 100644 --- a/lemur/certificates/schemas.py +++ b/lemur/certificates/schemas.py @@ -123,7 +123,7 @@ class CertificateInputSchema(CertificateCreationSchema): data['extensions']['subAltNames'] = { 'names': [] } - elif not data['extensions']['subAltNames']['names']: + elif not data['extensions']['subAltNames'].get('names'): data['extensions']['subAltNames']['names'] = [] data['extensions']['subAltNames']['names'] += csr_sans return missing.convert_validity_years(data)