noi-techpark / it.bz.opendatahub.api.mobility-ninja

The new home of the Open Data Hub Mobility API v2
Other
2 stars 0 forks source link

Events ACL gives 400 error instead of empty result #31

Closed dulvui closed 1 year ago

dulvui commented 1 year ago

When getting closed measurement data without authentication, an empty json result is returned. Exmaple: https://mobility.api.opendatahub.com/v2/flat%2Cevent/TrafficSensor/latest?limit=200&offset=0&shownull=false&distinct=true

When doing the same for events, a 400 error is returned with the message ERROR: missing FROM-clause entry for table 's'\n Position: 836 Example: https://mobility.api.opendatahub.testingmachine.eu/v2/flat,event/PROVINCE_BZ?select=evcategory&distinct=1

clezag commented 1 year ago

There was an issue where ACL rules were cached, but with a single cache between events and stations, so whichever one was called first remained in the cache. I've introduced two separate caches now, which should fix it