mirror of
https://github.com/simonw/datasette.git
synced 2025-12-10 16:51:24 +01:00
Fixed bug with metadata config of array/date facets, closes #1552
Thanks @davidbgk for spotting the fix for the bug.
This commit is contained in:
parent
40e5b0a5b5
commit
20a2ed6bec
3 changed files with 43 additions and 4 deletions
|
|
@ -30,7 +30,7 @@ def load_facet_configs(request, table_metadata):
|
|||
assert (
|
||||
len(metadata_config.values()) == 1
|
||||
), "Metadata config dicts should be {type: config}"
|
||||
type, metadata_config = metadata_config.items()[0]
|
||||
type, metadata_config = list(metadata_config.items())[0]
|
||||
if isinstance(metadata_config, str):
|
||||
metadata_config = {"simple": metadata_config}
|
||||
facet_configs.setdefault(type, []).append(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue