fix: import dashboard stale filter_scopes (#17741)
This commit is contained in:
parent
e2e79923d3
commit
2633bcccc3
|
|
@ -84,6 +84,7 @@ def update_id_refs( # pylint: disable=too-many-locals
|
|||
metadata["filter_scopes"] = {
|
||||
str(id_map[int(old_id)]): columns
|
||||
for old_id, columns in metadata["filter_scopes"].items()
|
||||
if int(old_id) in id_map
|
||||
}
|
||||
|
||||
# now update columns to use new IDs:
|
||||
|
|
@ -107,6 +108,7 @@ def update_id_refs( # pylint: disable=too-many-locals
|
|||
{
|
||||
str(id_map[int(old_id)]): value
|
||||
for old_id, value in default_filters.items()
|
||||
if int(old_id) in id_map
|
||||
}
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -45,7 +45,10 @@ def test_update_id_refs_immune_missing( # pylint: disable=invalid-name
|
|||
},
|
||||
},
|
||||
"metadata": {
|
||||
"filter_scopes": {"101": {"filter_name": {"immune": [102, 103],},},},
|
||||
"filter_scopes": {
|
||||
"101": {"filter_name": {"immune": [102, 103]}},
|
||||
"104": {"filter_name": {"immune": [102, 103]}},
|
||||
},
|
||||
},
|
||||
"native_filter_configuration": [],
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue