Merge pull request #2891 from rajatsharma94/bugfix
fix fatal error in schema validator
This commit is contained in:
commit
21c651a566
|
@ -119,6 +119,9 @@ class CertificateInputSchema(CertificateCreationSchema):
|
||||||
|
|
||||||
@validates_schema
|
@validates_schema
|
||||||
def validate_authority(self, data):
|
def validate_authority(self, data):
|
||||||
|
if 'authority' not in data:
|
||||||
|
raise ValidationError("Missing Authority.")
|
||||||
|
|
||||||
if isinstance(data["authority"], str):
|
if isinstance(data["authority"], str):
|
||||||
raise ValidationError("Authority not found.")
|
raise ValidationError("Authority not found.")
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue