You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2020/02/22 00:56:14 UTC

[GitHub] [incubator-superset] serenajiang commented on a change in pull request #9188: [dashboard] fix filter_scopes when copy dashboard with duplicate_slices

serenajiang commented on a change in pull request #9188: [dashboard] fix filter_scopes when copy dashboard with duplicate_slices
URL: https://github.com/apache/incubator-superset/pull/9188#discussion_r382867663
 
 

 ##########
 File path: superset/views/core.py
 ##########
 @@ -1195,6 +1195,20 @@ def copy_dash(self, dashboard_id):
                     old_id = "{}".format(value.get("meta").get("chartId"))
                     new_id = int(old_to_new_sliceids[old_id])
                     value["meta"]["chartId"] = new_id
+
+            if "filter_scopes" in data:
 
 Review comment:
   This looks pretty similar to the chunk of code [here](https://github.com/apache/incubator-superset/blob/3efdfc53456aa702d01fee90c17b79ba9531c9b8/superset/models/dashboard.py#L341). Can we pull this out into a function?

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org