This is an automated email from the ASF dual-hosted git repository. johnbodley pushed a commit to branch feature--embeddable-charts-pilot in repository https://gitbox.apache.org/repos/asf/incubator-superset.git
commit 4adefbcb9cdc2e041318ff4ddfe1bd22f66aa82d Author: Conglei Shi <[email protected]> AuthorDate: Fri Dec 14 16:04:41 2018 -0800 fixed tests --- superset/viz.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/superset/viz.py b/superset/viz.py index 4a89a98..ed6f43b 100644 --- a/superset/viz.py +++ b/superset/viz.py @@ -183,7 +183,7 @@ class BaseViz(object): return fillna def get_samples(self): - query_obj = self._query_obj() + query_obj = self.query_obj() query_obj.update({ 'groupby': [], 'metrics': [], @@ -196,7 +196,7 @@ class BaseViz(object): def get_df(self, query_obj=None): """Returns a pandas dataframe based on the query object""" if not query_obj: - query_obj = self._query_obj() + query_obj = self.query_obj() if not query_obj: return None @@ -267,7 +267,6 @@ class BaseViz(object): }) return query_obj - def _query_obj(self): """Building a query object""" form_data = self.form_data @@ -396,7 +395,7 @@ class BaseViz(object): def get_df_payload(self, query_obj=None, **kwargs): """Handles caching around the df payload retrieval""" if not query_obj: - query_obj = self._query_obj() + query_obj = self.query_obj() cache_key = self.cache_key(query_obj, **kwargs) if query_obj else None logging.info('Cache key: {}'.format(cache_key)) is_loaded = False @@ -1210,7 +1209,7 @@ class NVD3TimeSeriesViz(NVD3Viz): time_compare = [time_compare] for option in time_compare: - query_object = self._query_obj() + query_object = self.query_obj() delta = utils.parse_human_timedelta(option) query_object['inner_from_dttm'] = query_object['from_dttm'] query_object['inner_to_dttm'] = query_object['to_dttm']
