superset-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ccwilli...@apache.org
Subject [incubator-superset] branch master updated: [api/v1][query_obj] add default prequeries array (#7039)
Date Fri, 15 Mar 2019 07:22:42 GMT
This is an automated email from the ASF dual-hosted git repository.

ccwilliams pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-superset.git


The following commit(s) were added to refs/heads/master by this push:
     new 7d7210d  [api/v1][query_obj] add default prequeries array (#7039)
7d7210d is described below

commit 7d7210d6ce5f3a962196923034edeb36ea11ce4f
Author: Chris Williams <williaster@users.noreply.github.com>
AuthorDate: Fri Mar 15 00:22:29 2019 -0700

    [api/v1][query_obj] add default prequeries array (#7039)
    
    * [api/v1][query_obj] add default prequeries array
    
    * [api/v1][query_obj] fix prequeries type
---
 superset/common/query_object.py | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/superset/common/query_object.py b/superset/common/query_object.py
index a239404..62b9725 100644
--- a/superset/common/query_object.py
+++ b/superset/common/query_object.py
@@ -32,6 +32,7 @@ class QueryObject:
     The query object's schema matches the interfaces of DB connectors like sqla
     and druid. The query objects are constructed on the client.
     """
+
     def __init__(
             self,
             granularity: str,
@@ -46,7 +47,7 @@ class QueryObject:
             timeseries_limit_metric: Optional[Dict] = None,
             order_desc: bool = True,
             extras: Optional[Dict] = None,
-            prequeries: Optional[Dict] = None,
+            prequeries: Optional[List[Dict]] = None,
             is_prequery: bool = False,
             columns: List[str] = None,
             orderby: List[List] = None,
@@ -67,7 +68,7 @@ class QueryObject:
         self.timeseries_limit = timeseries_limit
         self.timeseries_limit_metric = timeseries_limit_metric
         self.order_desc = order_desc
-        self.prequeries = prequeries
+        self.prequeries = prequeries if prequeries is not None else []
         self.is_prequery = is_prequery
         self.extras = extras if extras is not None else {}
         self.columns = columns if columns is not None else []


Mime
View raw message