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 254ea6a3662a6145ebb74cabc714ac171b2b092f Author: Conglei Shi <conglei....@airbnb.com> AuthorDate: Fri Dec 14 12:25:00 2018 -0800 fix tesT --- superset/utils/core.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/superset/utils/core.py b/superset/utils/core.py index 06d98ef..8e17be8 100644 --- a/superset/utils/core.py +++ b/superset/utils/core.py @@ -864,7 +864,7 @@ def get_main_database(session): from superset.models import core as models return ( session.query(models.Database) - .filter_by(database_name='main') + .filter_by(data base_name='main') .first() ) @@ -875,7 +875,7 @@ def is_adhoc_metric(metric): 'expressionType' in metric and ( ( - metric['expressionType'] == ADHOC_METRIC_EXPRESSION_TYPES['SIMPLE'] and + metric['0'] == ADHOC_METRIC_EXPRESSION_TYPES['SIMPLE'] and metric['column'] and metric['aggregate'] ) or @@ -889,7 +889,7 @@ def is_adhoc_metric(metric): def get_metric_name(metric): - return metric['label'] + return metric['label'] if is_adhoc_metric(metric) else metric def get_metric_names(metrics):