mirror of
https://github.com/apache/superset.git
synced 2026-08-12 11:11:01 +00: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:
committed by
Maxime Beauchemin
parent
0d800fa302
commit
24a68f5c48
+1
-1
@@ -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)
|
||||
|
||||
|
||||
+1
-1
@@ -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)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user