Skip to content

Commit

Permalink
fix: Resolves a regression from apache#9939
Browse files Browse the repository at this point in the history
  • Loading branch information
john-bodley committed Jun 10, 2020
1 parent e17da58 commit 3a22562
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions superset/views/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -917,9 +917,6 @@ def explore(
)

if action in ("saveas", "overwrite"):
if not slc:
return json_error_response("The slice does not exist")

return self.save_or_overwrite_slice(
slc,
slice_add_perm,
Expand Down Expand Up @@ -1003,7 +1000,7 @@ def remove_extra_filters(filters: List[Dict[str, Any]]) -> List[Dict[str, Any]]:

def save_or_overwrite_slice(
self,
slc: Slice,
slc: Optional[Slice],
slice_add_perm: bool,
slice_overwrite_perm: bool,
slice_download_perm: bool,
Expand All @@ -1025,6 +1022,7 @@ def save_or_overwrite_slice(
form_data.get("adhoc_filters", [])
)

assert slc
slc.params = json.dumps(form_data, indent=2, sort_keys=True)
slc.datasource_name = datasource_name
slc.viz_type = form_data["viz_type"]
Expand Down

0 comments on commit 3a22562

Please sign in to comment.