Describe the bug
When cloning an item and setting a new owner, the owner will not be respected if that item does not have a folder.
To Reproduce
Clone an item without a folder and setting an owner
Platform (please complete the following information):
- OS: Windows
- Python API Version: 2.4.3
Additional context
The bug appears because when there is no folder the given owner is not respected.
if self.folder:
folder = self.target.content.folders.get(
folder=self.folder, owner=self.owner
)
else:
folder = self.target.content.folders.get()
The fix
folder = self.target.content.folders.get(owner=self.owner)
Describe the bug
When cloning an item and setting a new owner, the owner will not be respected if that item does not have a folder.
To Reproduce
Clone an item without a folder and setting an owner
Platform (please complete the following information):
Additional context
The bug appears because when there is no folder the given owner is not respected.
The fix
folder = self.target.content.folders.get(owner=self.owner)