Fix unassigning unshared repositories [SCI-12269]

This commit is contained in:
Martin Artnik 2025-08-18 09:30:13 +02:00
parent d93749e19b
commit 8c4f406d8e

View file

@ -118,7 +118,7 @@ module Shareable
teams = for_team ? Team.where(id: for_team.id).where.not(id: team.id) : Team.where.not(id: team.id)
user_assignments.where(team_id: teams.select(:id)).destroy_all
user_group_assignments.where.not(team_id: teams.select(:id)).destroy_all
team_assignments.where.not(team_id: teams.select(:id)).destroy_all
user_group_assignments.where(team_id: teams.select(:id)).destroy_all
team_assignments.where(team_id: teams.select(:id)).destroy_all
end
end