Commit ae65230c authored by Robert May's avatar Robert May

Remove unindexed condition on label transfer

The `type` field isn't indexed in this manner and is ultimately
superfluous anyway. See
https://gitlab.com/gitlab-org/gitlab/-/issues/18754 for
discussion.
parent 661d1ff7
......@@ -53,7 +53,7 @@ module Labels
@group_labels_applied_to_issues ||= Label.joins(:issues)
.where(
issues: { project_id: project.id },
labels: { type: 'GroupLabel', group_id: old_group.self_and_ancestors }
labels: { group_id: old_group.self_and_ancestors }
)
end
# rubocop: enable CodeReuse/ActiveRecord
......@@ -63,7 +63,7 @@ module Labels
@group_labels_applied_to_merge_requests ||= Label.joins(:merge_requests)
.where(
merge_requests: { target_project_id: project.id },
labels: { type: 'GroupLabel', group_id: old_group.self_and_ancestors }
labels: { group_id: old_group.self_and_ancestors }
)
end
# rubocop: enable CodeReuse/ActiveRecord
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment