mirror of
https://github.com/apache/superset.git
synced 2024-09-12 08:39:45 -04:00
Two hotfixes (#574)
* fix for dashboards created without slices * [hotfix] check_ownership param needed for adding slice to dashboard
This commit is contained in:
parent
0d800fa302
commit
24a68f5c48
@ -315,7 +315,7 @@ class Dashboard(Model, AuditMixinNullable):
|
||||
'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)
|
||||
|
||||
|
@ -508,7 +508,7 @@ class DashboardModelView(CaravelModelView, DeleteMixin): # noqa
|
||||
obj.slug = re.sub(r'\W+', '', obj.slug)
|
||||
|
||||
def pre_update(self, obj):
|
||||
check_ownership()
|
||||
check_ownership(obj)
|
||||
self.pre_add(obj)
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user