Skip to content

Commit

Permalink
[hotfix] fix name change on test dashboard triggers error
Browse files Browse the repository at this point in the history
  • Loading branch information
mistercrunch committed May 19, 2016
1 parent 4738b01 commit f5180d8
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions caravel/data/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit f5180d8

Please sign in to comment.