Merge branch 'bugfix/schedule-enable' into 'dev'

Fix enabling/disabling schedules from schedule list

See merge request crafty-controller/crafty-4!606
This commit is contained in:
Iain Powrie 2023-07-18 20:02:02 +00:00
commit be37f8f49e
3 changed files with 29 additions and 26 deletions

View File

@ -6,6 +6,7 @@ TBD
- Include tzdata in Docker image ([Merge Request](https://gitlab.com/crafty-controller/crafty-4/-/merge_requests/604))
- Fix text/formatting issue on server config page ([Merge Request](https://gitlab.com/crafty-controller/crafty-4/-/merge_requests/602))
- Bump required version of PyYAML to 6.0.1 ([Merge Request](https://gitlab.com/crafty-controller/crafty-4/-/merge_requests/609))
- Fix enable/disable schedule toggles on schedule list ([Merge Request](https://gitlab.com/crafty-controller/crafty-4/-/merge_requests/606))
### Tweaks
- Add public status link to login ([Merge Request](https://gitlab.com/crafty-controller/crafty-4/-/merge_requests/608))
### Lang

View File

@ -92,6 +92,7 @@ class ApiServersServerTasksIndexHandler(BaseApiHandler):
data["start_time"] = "00:00"
# validate cron string
if "cron_string" in data:
if data["cron_string"] != "" and not croniter.is_valid(data["cron_string"]):
return self.finish_json(
405,

View File

@ -136,6 +136,7 @@ class ApiServersServerTasksTaskIndexHandler(BaseApiHandler):
data["parent"] = None
data["server_id"] = server_id
if "cron_string" in data:
if data["cron_string"] != "" and not croniter.is_valid(data["cron_string"]):
return self.finish_json(
405,