Esri / arcgis-python-api

Documentation and samples for ArcGIS API for Python
https://developers.arcgis.com/python/
Apache License 2.0
1.87k stars 1.1k forks source link

clone_item() hosted feature service referencing to source portal #1871

Open stwrr opened 2 months ago

stwrr commented 2 months ago

Describe the bug When I use clone_item() on a hosted feature service, even after it has been cloned into the target portal, it still references the source portal. So when I try to use the cloned content in the target portal, a pop-up appears asking me to connect to the source portal in order to use the content in my target portal.

I even tried setting the copy_data parameter to true but it doesn't change anything.

To Reproduce To clone my content I have used two differents methods (but both doesn't work as intended) :

1st method :

2nd method :

dashboard = source.content.get(itemId)
dash_clone = target.content.clone_items(items = [dashboard], search_existing_items = True)

Expected behavior I expect to be able to use the cloned content in my target portal, without needing to connect to the source portal.

Platform (please complete the following information):

nparavicini7 commented 1 month ago

@stwrr have you tried using the latest version of the Python API? This is an older version and there have been various improvements since then