Skip to content
This repository has been archived by the owner on Oct 16, 2024. It is now read-only.

Commit

Permalink
Improve method naming
Browse files Browse the repository at this point in the history
  • Loading branch information
javierdelapuente committed Jun 10, 2024
1 parent 742db47 commit 1412556
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions paas_app_charmer/_gunicorn/charm_state.py
Original file line number Diff line number Diff line change
Expand Up @@ -319,8 +319,8 @@ class SamlParameters(BaseModel, extra=Extra.allow):

@field_validator("signing_certificate")
@classmethod
def validate_signing_certificate(cls, certs: str, _: ValidationInfo) -> str:
"""Validate signing certificate from list of certificates.
def validate_signing_certificate_exists(cls, certs: str, _: ValidationInfo) -> str:
"""Validate that at least a certificate exists in the list of certificates.
It is a prerequisite that the fist certificate is the signing certificate,
otherwise this method would return a wrong certificate.
Expand All @@ -336,5 +336,5 @@ def validate_signing_certificate(cls, certs: str, _: ValidationInfo) -> str:
"""
certificate = certs.split(",")[0]
if not certificate:
raise ValueError("Missing x509certs")
raise ValueError("Missing x509certs. There should be at least one certificate.")
return certificate

0 comments on commit 1412556

Please sign in to comment.