Skip to content

Commit

Permalink
[bugfix] only pop slice_id when it exists in url (#2065)
Browse files Browse the repository at this point in the history
  • Loading branch information
vera-liu authored Jan 27, 2017
1 parent 4a8cd04 commit 63bef2f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion superset/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -1677,7 +1677,8 @@ def save_or_overwrite_slice(
datasource_id = args.get('datasource_id')

if action in ('saveas'):
d.pop('slice_id') # don't save old slice_id
if 'slice_id' in d:
d.pop('slice_id') # don't save old slice_id
slc = models.Slice(owners=[g.user] if g.user else [])

slc.params = json.dumps(d, indent=4, sort_keys=True)
Expand Down

0 comments on commit 63bef2f

Please sign in to comment.