The discharge status update process does not work in production.
I think this is because a post to the cache is somehow being seen as a get. If I switch off the cache things work OK.
The specific error is (fake CSN)
hyui-prod-api-1 | get_rows.requests: Elapsed time: 0.0369
hyui-prod-api-1 | INFO: 172.19.0.4:59106 - "GET /baserow/discharge_status/?csn=999999999&status=discharge HTTP/1.1" 200 OK
hyui-prod-web-1 | Discharge updates: Elapsed time: 0.642 seconds
hyui-prod-web-1 | Exception on /_dash-update-component [POST]
hyui-prod-web-1 | Traceback (most recent call last):
hyui-prod-web-1 | File "pydantic/main.py", line 522, in pydantic.main.BaseModel.parse_obj
hyui-prod-web-1 | ValueError: dictionary update sequence element #0 has length 5; 2 is required
but the response.json() is a list of dictionaries which is what would have been returned from a get request to that endpoint (rather than a post).
The discharge status update process does not work in production. I think this is because a
post
to the cache is somehow being seen as aget
. If I switch off the cache things work OK.The specific error is (fake CSN)
but the
response.json()
is a list of dictionaries which is what would have been returned from aget
request to that endpoint (rather than apost
).