Skip to content

Commit

Permalink
Two hotfixes (#574)
Browse files Browse the repository at this point in the history
* fix for dashboards created without slices

* [hotfix] check_ownership param needed for adding slice to dashboard
  • Loading branch information
georgeke authored and mistercrunch committed Jun 7, 2016
1 parent 0d800fa commit 24a68f5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion caravel/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,7 @@ def json_data(self):
'dashboard_title': self.dashboard_title,
'slug': self.slug,
'slices': [slc.data for slc in self.slices],
'position_json': json.loads(self.position_json),
'position_json': json.loads(self.position_json) if self.position_json else [],
}
return json.dumps(d)

Expand Down
2 changes: 1 addition & 1 deletion caravel/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -508,7 +508,7 @@ def pre_add(self, obj):
obj.slug = re.sub(r'\W+', '', obj.slug)

def pre_update(self, obj):
check_ownership()
check_ownership(obj)
self.pre_add(obj)


Expand Down

0 comments on commit 24a68f5

Please sign in to comment.