mirror of
https://github.com/simonw/datasette.git
synced 2025-12-10 16:51:24 +01:00
Correctly display facets with value of 0 - fixes #318
Also added comprehensive unit test for facet display HTML.
This commit is contained in:
parent
fdfbbbb9ee
commit
aeeb50f61b
5 changed files with 122 additions and 34 deletions
|
|
@ -117,7 +117,7 @@ def test_database_page(app_client):
|
|||
'label_column': 'name',
|
||||
'primary_keys': ['id'],
|
||||
}, {
|
||||
'columns': ['pk', 'planet_int', 'state', 'city_id', 'neighborhood'],
|
||||
'columns': ['pk', 'planet_int', 'on_earth', 'state', 'city_id', 'neighborhood'],
|
||||
'name': 'facetable',
|
||||
'count': 15,
|
||||
'foreign_keys': {
|
||||
|
|
@ -1107,6 +1107,7 @@ def test_expand_labels(app_client):
|
|||
"2": {
|
||||
"pk": 2,
|
||||
"planet_int": 1,
|
||||
"on_earth": 1,
|
||||
"state": "CA",
|
||||
"city_id": {
|
||||
"value": 1,
|
||||
|
|
@ -1117,6 +1118,7 @@ def test_expand_labels(app_client):
|
|||
"13": {
|
||||
"pk": 13,
|
||||
"planet_int": 1,
|
||||
"on_earth": 1,
|
||||
"state": "MI",
|
||||
"city_id": {
|
||||
"value": 3,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue