Skip to content

Commit

Permalink
allow optional CN in reissue and clone
Browse files Browse the repository at this point in the history
  • Loading branch information
charhate committed Feb 12, 2024
1 parent efd2255 commit 387566a
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lemur/certificates/schemas.py
Original file line number Diff line number Diff line change
Expand Up @@ -369,6 +369,11 @@ def handle_subject_details(self, data):
if field in data and data[field] is None:
data.pop(field)

# Earlier common_name was a required field and thus in most places there is no None check for it.
# Now that it is optional, setting value as empty string instead of None for backward compatibility
if data.get("common_name") is None:
data["common_name"] = ""


class CertificateShortOutputSchema(LemurOutputSchema):
id = fields.Integer()
Expand Down

0 comments on commit 387566a

Please sign in to comment.