serenajiang commented on a change in pull request #9224: refactor copy 
filter_scopes and add tests
URL: 
https://github.com/apache/incubator-superset/pull/9224#discussion_r386619690
 
 

 ##########
 File path: superset/views/core.py
 ##########
 @@ -1233,20 +1218,17 @@ def save_dash(self, dashboard_id):
         dash = session.query(Dashboard).get(dashboard_id)
         check_ownership(dash, raise_if_false=True)
         data = json.loads(request.form.get("data"))
-        if "filter_scopes" in data:
-            new_filter_scopes = copy_filter_scopes(
-                old_to_new_slc_id_dict={slc.id: slc.id for slc in dash.slices},
-                old_filter_scopes=json.loads(data["filter_scopes"] or "{}"),
-            )
-            data["filter_scopes"] = json.dumps(new_filter_scopes)
         self._set_dash_metadata(dash, data)
         session.merge(dash)
         session.commit()
         session.close()
         return json_success(json.dumps({"status": "SUCCESS"}))
 
     @staticmethod
-    def _set_dash_metadata(dashboard, data):
+    def _set_dash_metadata(
+        dashboard, data, old_to_new_slice_ids: Union[Dict[int, int], None] = 
None
 
 Review comment:
   ```suggestion
           dashboard, data, old_to_new_slice_ids: Optional[Dict[int, int]] = 
None
   ```

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to