Closed
Description
The from_
and to
attrs validators seem to be wrong in non_revoked
. Following error encountered:
pydantic.error_wrappers.ValidationError: 2 validation errors for IndyProofRequest
E requested_attributes -> additionalProp1 -> non_revoked -> from
E from_ must be less than -1, currently 1640995199 (type=value_error)
E requested_attributes -> additionalProp1 -> non_revoked -> to
E to must be less than -1, currently 1640995199 (type=value_error)
similar errors have been encountered before. The value should not as the validator suggests in aries_cloudcontroller/model/indy_proof_req_attr_spec_non_revoked.py
be less than -1 (to) and larger 0 (from_). Both should just be positive integers(?) since according to aca-py swagger these values are seconds since unix epoch values.
actually this just seems off:
from aries_cloudcontroller/model/indy_proof_req_attr_spec_non_revoked.py
@validator("from_")
def from__max(cls, value):
# Property is optional
if value is None:
return
if value > -1:
raise ValueError(f"from_ must be less than -1, currently {value}")
return value
@validator("from_")
def from__min(cls, value):
# Property is optional
if value is None:
return
if value < 0:
raise ValueError(f"from_ must be greater than 0, currently {value}")
return value
@validator("to")
def to_max(cls, value):
# Property is optional
if value is None:
return
if value > -1:
raise ValueError(f"to must be less than -1, currently {value}")
return value
@validator("to")
def to_min(cls, value):
# Property is optional
if value is None:
return
if value < 0:
raise ValueError(f"to must be greater than 0, currently {value}")
return value
Metadata
Metadata
Assignees
Labels
No labels