issue_comments: 996100774
This data as json
html_url | issue_url | id | node_id | user | created_at | updated_at | author_association | body | reactions | issue | performed_via_github_app |
---|---|---|---|---|---|---|---|---|---|---|---|
https://github.com/simonw/datasette/issues/625#issuecomment-996100774 | https://api.github.com/repos/simonw/datasette/issues/625 | 996100774 | IC_kwDOBm6k_c47X0qm | 9599 | 2021-12-16T19:10:01Z | 2021-12-16T19:10:48Z | OWNER | I think the problem here may be in the design of the JSON returned by facets. It looks like this: ``` "facet_results": { "tags": { "name": "tags", "type": "array", "results": [...], "hideable": false, "toggle_url": "/fixtures/facetable.json?_facet=tags&_trace=1&_nosuggest=1", "truncated": false }, "created": { "name": "created", "type": "date", "results": [...] ``` The problem then is that the `tags` key is over-ridden by the second facet with a different type against the same column name! https://latest-with-plugins.datasette.io/fixtures/facetable?_trace=1&_facet=created&_facet_date=created&_facet_array=tags&_facet=tags confirms that the SQL queries for those facets are being executed - but the final JSON doesn't show them on https://latest-with-plugins.datasette.io/fixtures/facetable.json?_trace=1&_facet=created&_facet_date=created&_facet_array=tags&_facet=tags They're not available in the template context either: https://latest-with-plugins.datasette.io/fixtures/facetable?_facet=created&_facet_date=created&_facet_array=tags&_facet=tags&_context=1 | {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} | 520740741 |