Show schedule throws exception
robertaramar opened this issue · 1 comments
robertaramar commented
I do get a valid response, however, an exception is thrown. I am not so much a Python person, I assume you iterate over the weekdays and as it doesn't find "monday" in it, it fails.
{
"data": {
"type": "Car",
"id": "VF1AG000*********",
"attributes": {
"mode": "always",
"schedules": [{
"id": 1,
"activated": true,
"thursday": {
"startTime": "T01:00Z",
"duration": 120
}
}, {
"id": 2,
"activated": false
}, {
"id": 3,
"activated": false
}, {
"id": 4,
"activated": false
}, {
"id": 5,
"activated": false
}]
}
}
}
jamesremuscat commented
Thanks for the report.
Previous versions of the scheduler API were very strict about requiring exactly one schedule per day, and all days needing to be present. pyze's validation is designed to match that; but according to that response, those requirements are out of date. We need to make pyze's validation more lax, it seems.