From f5180d8724272540c911a9d4a91325fd356c91e5 Mon Sep 17 00:00:00 2001 From: Maxime Beauchemin Date: Thu, 19 May 2016 08:51:13 -0700 Subject: [PATCH] [hotfix] fix name change on test dashboard triggers error --- caravel/data/__init__.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/caravel/data/__init__.py b/caravel/data/__init__.py index c6586ec8b4f4..f559851eb403 100644 --- a/caravel/data/__init__.py +++ b/caravel/data/__init__.py @@ -375,7 +375,8 @@ def load_world_bank_health_n_pop(): print("Creating a World's Health Bank dashboard") dash_name = "World's Bank Data" - dash = db.session.query(Dash).filter_by(dashboard_title=dash_name).first() + slug = "world_health" + dash = db.session.query(Dash).filter_by(slug=slug).first() if not dash: dash = Dash() @@ -459,7 +460,7 @@ def load_world_bank_health_n_pop(): dash.dashboard_title = dash_name dash.position_json = json.dumps(l, indent=4) - dash.slug = "world_health" + dash.slug = slug dash.slices = slices[:-1] db.session.merge(dash)