gbusch commented on issue #18109:
URL: https://github.com/apache/superset/issues/18109#issuecomment-1059241195


   I have the same problem.
   
   I think it is easily fixable by adding 4 lines in the method 
"update_id_refs" in the file 
"superset/dashboards/commands/importers/v1/utils.py":
   
   ```
       # fix native filter references
       native_filter_configuration = fixed.get("metadata", {}).get(
           "native_filter_configuration", []
       )
       for native_filter in native_filter_configuration:
           targets = native_filter.get("targets", [])
           for target in targets:
               dataset_uuid = target.pop("datasetUuid", None)
               if dataset_uuid:
                   target["datasetId"] = 
dataset_info[dataset_uuid]["datasource_id"]
   
           charts_in_scope = native_filter.get("chartsInScope", [])
           native_filter["chartsInScope"] = [id_map[id] for id in 
charts_in_scope]
   
           excluded_scopes = native_filter.get("scope", {}).get("excluded", [])
           native_filter["scope"]["excluded"] = [id_map[id] for id in 
excluded_scopes]
   
       return fixed
   ```
   
   Will try to open a PR for this. Not sure whether I will manage as I never 
committed to this project...
   But maybe this already helps you?


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

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



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

Reply via email to