mirror of
https://github.com/apache/superset.git
synced 2026-04-19 16:14:52 +00:00
fix: Fix migration for removing time_range_endpoints 3 (#19767)
* fix migration * so dumb * update test * add code change * retest
This commit is contained in:
@@ -16,7 +16,7 @@
|
||||
# under the License.
|
||||
import json
|
||||
|
||||
from superset.migrations.versions.cecc6bf46990_rm_time_range_endpoints_2 import (
|
||||
from superset.migrations.versions.ad07e4fdbaba_rm_time_range_endpoints_from_qc_3 import (
|
||||
Slice,
|
||||
upgrade_slice,
|
||||
)
|
||||
@@ -106,7 +106,9 @@ sample_query_context = {
|
||||
"post_processing": [],
|
||||
}
|
||||
],
|
||||
"form_data": {},
|
||||
"form_data": {
|
||||
"time_range_endpoints": ["inclusive", "exclusive"],
|
||||
},
|
||||
"result_format": "json",
|
||||
"result_type": "full",
|
||||
}
|
||||
@@ -123,6 +125,9 @@ def test_upgrade():
|
||||
extras = q.get("extras", {})
|
||||
assert "time_range_endpoints" not in extras
|
||||
|
||||
form_data = query_context.get("form_data", {})
|
||||
assert "time_range_endpoints" not in form_data
|
||||
|
||||
|
||||
def test_upgrade_bad_json():
|
||||
slc = Slice(slice_name="FOO", query_context="abc")
|
||||
Reference in New Issue
Block a user