Currently, the API's get_analysis endpoint passes a single argument into the PolicyEngineDatabase.query() statement that runs on the deployed database. However, this argument is a string, while the deployed database calls for a list and the local database that runs alongside it (and which we use to debug) calls for a tuple.
I'm not entirely sure why this wasn't a problem with our prior ChatGPT implementation, but I have a few theories that I won't expound on here. Either way, it seems to be a bigger issue with the deployed MySQL database than the local SQLite one, so the below video demonstrates the code working with the deployed database:
Fixes #1510.
Currently, the API's
get_analysis
endpoint passes a single argument into thePolicyEngineDatabase.query()
statement that runs on the deployed database. However, this argument is a string, while the deployed database calls for a list and the local database that runs alongside it (and which we use to debug) calls for a tuple.I'm not entirely sure why this wasn't a problem with our prior ChatGPT implementation, but I have a few theories that I won't expound on here. Either way, it seems to be a bigger issue with the deployed MySQL database than the local SQLite one, so the below video demonstrates the code working with the deployed database:
https://github.com/PolicyEngine/policyengine-api/assets/14987227/02fa0de3-460b-4243-b927-1e112559e699