-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Open
Labels
Description
Describe the bug
Hello,
When cloning a StoryMap the parameter preserving_item_id parameter is not respected. Even if I specify I set it to True it will get a new id.
When looking at the documentation I see this:
Optional string. Available in ArcGIS Enterprise 10.8.1+. Not available in ArcGIS Online.
but the code does this (_impl/common/_itemdef/_storymaps):
if self._preserve_item_id and self.target._portal.is_arcgisonline:
item_id = self.portal_item.itemidI believe this is an error because while looking at the other part of the code I see this:
if self._preserve_item_id and self.target._portal.is_arcgisonline == False:
item_id = self.portal_item.itemidIs it possible that it should be == False instead ?
To Reproduce
Steps to reproduce the behavior:
gis.content.clone_items(
items=[item],
copy_data=True,
copy_global_ids=True,
owner=user,
preserve_item_id=True,
preserve_editing_info=True,
copy_code_attachment=True,
)Error:
Item has a new id instead of the old one
Expected behavior
The item should have the same id as the copied item.
Platform (please complete the following information):
- OS: Windows 11 Enterprise
- Python API Version: 2.4.2