Skip to content

Conversation

@RandomByte
Copy link
Member

@RandomByte RandomByte commented Dec 22, 2022

When cloning a Resource, the new Resource instance should not be associated with any project. This allows for use cases where a resource is copied from one project to another.

The problematic behavior was introduced with #448 and motivated by the need of the memory adapter to clone resources while keeping the project association.

However, since memory adapters are always assigned a project, they can easily just assign that project to the cloned resource. This has been implemented in this PR.

@coveralls
Copy link

coveralls commented Dec 22, 2022

Coverage Status

Coverage decreased (-0.05%) to 88.722% when pulling 1ac5c24 on resource-clone-remove-project-assoc into 28dcdd6 on main.

@RandomByte RandomByte requested review from a team and flovogt December 22, 2022 10:11
When cloning a Resource, the new Resource instance should not be
associated with any project. This allows for use cases where a resource
is copied from one project to another.

The problematic behavior was introduced with
#448 and motivated by the need of the
memory adapter to clone resources while keeping the project association.

However, since memory adapters are always assigned a project, they can
easily just assign that project to the cloned resource. This has been
implemented in this PR.
@RandomByte RandomByte force-pushed the resource-clone-remove-project-assoc branch from 957cdfb to 1ac5c24 Compare December 22, 2022 11:10
@RandomByte RandomByte merged commit 4927296 into main Dec 22, 2022
@RandomByte RandomByte deleted the resource-clone-remove-project-assoc branch December 22, 2022 11:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants