From 30cd0e3836baa4e837374b44e9856fc91294a526 Mon Sep 17 00:00:00 2001 From: Ville Brofeldt <33317356+villebro@users.noreply.github.com> Date: Mon, 18 Feb 2019 19:20:59 +0200 Subject: [PATCH] Raise exception if long or lat not set in mapbox viz (#6867) --- superset/viz.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/superset/viz.py b/superset/viz.py index a88860e25..b2d96552a 100644 --- a/superset/viz.py +++ b/superset/viz.py @@ -1982,6 +1982,8 @@ class MapboxViz(BaseViz): label_col = fd.get('mapbox_label') if not fd.get('groupby'): + if fd.get('all_columns_x') is None or fd.get('all_columns_y') is None: + raise Exception(_('[Longitude] and [Latitude] must be set')) d['columns'] = [fd.get('all_columns_x'), fd.get('all_columns_y')] if label_col and len(label_col) >= 1: