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:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]