fix fatal error in schema validator

This commit is contained in:
rajatsharma94 2020-01-23 12:35:57 +01:00
parent 99f46c1add
commit 9984470b58
1 changed files with 3 additions and 0 deletions

View File

@ -119,6 +119,9 @@ class CertificateInputSchema(CertificateCreationSchema):
@validates_schema
def validate_authority(self, data):
if 'authority' not in data:
raise ValidationError("Missing Authority.")
if isinstance(data["authority"], str):
raise ValidationError("Authority not found.")