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_r385929520
 
 

 ##########
 File path: superset/views/core.py
 ##########
 @@ -1287,9 +1268,22 @@ def _set_dash_metadata(dashboard, data):
 
         if "timed_refresh_immune_slices" not in md:
             md["timed_refresh_immune_slices"] = []
+        new_filter_scopes: Dict[str, Dict] = {}
         if "filter_scopes" in data:
-            md["filter_scopes"] = json.loads(data["filter_scopes"] or "{}")
-        md["expanded_slices"] = data["expanded_slices"]
+            # replace filter_id and immune ids from old slice id to new slice 
id:
+            # and remove slice ids that are not in dash anymore
+            new_filter_scopes = copy_filter_scopes(
+                old_to_new_slc_id_dict={
+                    sid: old_to_new_sliceids[sid] if sid in 
old_to_new_sliceids else sid
 
 Review comment:
   ```suggestion
                       sid: old_to_new_sliceids.get(sid, sid)
   ```

----------------------------------------------------------------
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