opencivicdata / imago

django app powering Open Civic Data API
Other
12 stars 12 forks source link

bill search on sponsors.id not working #34

Closed dcloud closed 9 years ago

dcloud commented 9 years ago

curl -X "GET" "https://api.opencivicdata.org/bills/?sponsors.id=ocd-person%2F3b5daa7c-f127-472f-9bde-39d80f18e907&fields=id%2Ctitle"

will return an http 500.

dcloud commented 9 years ago

Internally raises an unhanded django.core.exceptions.FieldError: Cannot resolve keyword 'sponsors.id' into field. error. I believe this happens on PublicListEndpoint near line 284 where self.filter is run.

Not sure if imago was supposed to support sub/related object searches using dot notation or if there is supposed to be a generated field.

paultag commented 9 years ago

The fact this 500s is the bug here - we should get clean errors on this stuff when we put things into the API

dcloud commented 9 years ago

I'll tackle some of this error nonsense