Skip to content

Remove subject link to subject set. But keep the subject. #221

Open
@denys-potapov

Description

@denys-potapov

I try to move the subject from one subject set to another. Finding and adding the subject to new subject set works:

origin = SubjectSet.find(origin_id)
destination = SubjectSet.find(destination_id)
subject = Subject.find(subject_id)
destination.add(subject)

Now I see subject in both subject sets. But when i try to unlink the subject from origin. It deletes subject, so it's not visible in both subject_sets:

# this deletes subject
origin.remove(subject)

As i understand, removeng link from subject set to subject should not remove the subject itself?

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions