Skip to content

Cloning item is not assigning the correct owner #2500

Description

@MathieuLegault1

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)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions