Closed jfilter closed 6 years ago
For law, jurisdiction and public body, there are no URLs to link back to the site (e.g. https://fragdenstaat.de/gesetz/uig-nrw/)
If I understand https://github.com/okfde/froide/blob/a737a6f9e9426c6ef0d199077fcb92a25635c378/froide/foirequest/api_views.py#L264-L278 correctly, tags should be filterable by name. But I get no results with https://fragdenstaat.de/api/v1/request/?tags=Justiz.
What do I do wrong?
EDIT:
It works on public bodies. https://fragdenstaat.de/api/v1/publicbody/?tags__name=Justiz
Because tags are part of public bodies, maybe it should be:
def tag_filter(self, queryset, name, value):
return queryset.filter(**{
'public_body__tags__name': value,
})
I added the fields to request and added a site_url
field to law and jurisdiction (already present on public body).
There are two different kind of tags that are conceptually different: one for public bodies and one for requests. https://fragdenstaat.de/api/v1/request/?tags=Justiz is empty, because there's no (public) request with a 'Justiz' tag. Try e.g.: https://fragdenstaat.de/api/v1/request/?tags=RWE Currently filtering requests by their public body's tags is not supported. We are currently in the middle of restructuring the organisation of public bodies.
I changed the public body tags filter to be the same for consistency https://fragdenstaat.de/api/v1/publicbody/?tags=Justiz
Thanks!
Cool, thanks.
Currently filtering requests by their public body's tags is not supported. We are currently in the middle of restructuring the organisation of public bodies.
I don't really care about the tags – for now. I just want to offer same the possibility to filter requests like it's done on the web page à la https://fragdenstaat.de/anfragen/thema/arbeit-und-soziales/. But it's okay, it can wait.
description and summary of a request are missing in the new API e.g. https://fragdenstaat.de/api/v1/request/10766/