mirror of
https://github.com/apache/superset.git
synced 2026-04-19 08:04:53 +00:00
[fix] Adding SIP-15 support for the query context (#9219)
This commit is contained in:
@@ -23,6 +23,7 @@ import simplejson as json
|
||||
|
||||
from superset import app
|
||||
from superset.utils import core as utils
|
||||
from superset.views.utils import get_time_range_endpoints
|
||||
|
||||
# TODO: Type Metrics dictionary with TypedDict when it becomes a vanilla python type
|
||||
# https://github.com/python/mypy/issues/5288
|
||||
@@ -95,6 +96,10 @@ class QueryObject:
|
||||
self.timeseries_limit_metric = timeseries_limit_metric
|
||||
self.order_desc = order_desc
|
||||
self.extras = extras or {}
|
||||
|
||||
if app.config["SIP_15_ENABLED"] and "time_range_endpoints" not in self.extras:
|
||||
self.extras["time_range_endpoints"] = get_time_range_endpoints(form_data={})
|
||||
|
||||
self.columns = columns or []
|
||||
self.orderby = orderby or []
|
||||
|
||||
|
||||
Reference in New Issue
Block a user