Revize e9b4e2a1
Přidáno uživatelem Stanislav Král před téměř 4 roky(ů)
src/services/certificate_service.py | ||
---|---|---|
56 | 56 |
:param subject: A subject to be verified |
57 | 57 |
:raises InvalidCertificateAttribute: When a subject with an invalid attribute is passed |
58 | 58 |
""" |
59 |
if subject.country is not None and len(subject.country) != 2: |
|
59 |
if subject.country is not None and subject.country != "" and len(subject.country) != 2:
|
|
60 | 60 |
raise InvalidSubjectAttribute("Country code", "Must consist of exactly 2 letters") |
61 | 61 |
|
62 | 62 |
# TODO usages present in method parameters but not in class diagram |
Také k dispozici: Unified diff
Empty country code is now considered as a valid country code when creating a new certificate.
Changed tests accordingly.