Skip to content

Commit

Permalink
Adding owner(s) to dashboard makes them own underlying slices (#2610)
Browse files Browse the repository at this point in the history
  • Loading branch information
mistercrunch authored Apr 14, 2017
1 parent 15654a3 commit f5216f6
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions superset/views/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -453,6 +453,9 @@ def pre_add(self, obj):
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)
Expand Down

0 comments on commit f5216f6

Please sign in to comment.