Fix user group removal [SCI-12040]

This commit is contained in:
Martin Artnik 2025-07-03 15:51:40 +02:00 committed by GitHub
parent edf8e2d00a
commit 4dc4f42f87
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -30,7 +30,7 @@ class UserAssignment < ApplicationRecord
def remove_user_group_memberships
user.user_group_memberships
.joins(:user_group)
.where(user_group: { team_id: team_id })
.where(user_group: { team: assignable })
.destroy_all
end