mirror of https://github.com/apache/superset.git
Adding owner(s) to dashboard makes them own underlying slices (#2610)
This commit is contained in:
parent
15654a3082
commit
f5216f6047
|
@ -453,6 +453,9 @@ class DashboardModelView(SupersetModelView, DeleteMixin): # noqa
|
|||
obj.owners.append(g.user)
|
||||
utils.validate_json(obj.json_metadata)
|
||||
utils.validate_json(obj.position_json)
|
||||
owners = [o for o in obj.owners]
|
||||
for slc in obj.slices:
|
||||
slc.owners = list(set(owners) | set(slc.owners))
|
||||
|
||||
def pre_update(self, obj):
|
||||
check_ownership(obj)
|
||||
|
|
Loading…
Reference in New Issue