mirror of
https://github.com/apache/superset.git
synced 2026-04-19 08:04:53 +00:00
Fix bug where lists in queries cannot contain multiple types (#8032)
* use set instead of sorted to check equality of lists * run black
This commit is contained in:
committed by
Ville Brofeldt
parent
075b5a5d33
commit
17f0740692
@@ -301,6 +301,7 @@ class UtilsTestCase(unittest.TestCase):
|
||||
"extra_filters": [
|
||||
{"col": "a", "op": "in", "val": "someval"},
|
||||
{"col": "B", "op": "==", "val": ["c1", "c2"]},
|
||||
{"col": "c", "op": "in", "val": ["c1", 1, None]},
|
||||
],
|
||||
"adhoc_filters": [
|
||||
{
|
||||
@@ -317,6 +318,13 @@ class UtilsTestCase(unittest.TestCase):
|
||||
"operator": "==",
|
||||
"subject": "B",
|
||||
},
|
||||
{
|
||||
"clause": "WHERE",
|
||||
"comparator": ["c1", 1, None],
|
||||
"expressionType": "SIMPLE",
|
||||
"operator": "in",
|
||||
"subject": "c",
|
||||
},
|
||||
],
|
||||
}
|
||||
expected = {
|
||||
@@ -335,6 +343,13 @@ class UtilsTestCase(unittest.TestCase):
|
||||
"operator": "==",
|
||||
"subject": "B",
|
||||
},
|
||||
{
|
||||
"clause": "WHERE",
|
||||
"comparator": ["c1", 1, None],
|
||||
"expressionType": "SIMPLE",
|
||||
"operator": "in",
|
||||
"subject": "c",
|
||||
},
|
||||
]
|
||||
}
|
||||
merge_extra_filters(form_data)
|
||||
|
||||
Reference in New Issue
Block a user