riahk commented on a change in pull request #12926:
URL: https://github.com/apache/superset/pull/12926#discussion_r578774239
##########
File path: superset/reports/schemas.py
##########
@@ -158,14 +159,22 @@ class ReportSchedulePostSchema(Schema):
),
)
validator_config_json = fields.Nested(ValidatorConfigJSONSchema)
- log_retention = fields.Integer(description=log_retention_description,
example=90)
+ log_retention = fields.Integer(
+ description=log_retention_description,
+ example=90,
+ validate=[Range(min=1, error=_("Value must be greater than 0"))],
+ )
grace_period = fields.Integer(
- description=grace_period_description, example=60 * 60 * 4, default=60
* 60 * 4
+ description=grace_period_description,
+ example=60 * 60 * 4,
+ default=60 * 60 * 4,
+ validate=[Range(min=1, error=_("Value must be greater than 0"))],
Review comment:
I may be mistaken, but I'm pretty sure we use this schema for both
alerts and reports.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]