DEV: Improve TagGroup.resolve_permissions method arg type handling (#28016)

This commit is contained in:
Mark VanLandingham 2024-07-22 08:37:12 -05:00 committed by GitHub
parent 215b1951e4
commit 30c4c29946
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 1 deletions

View File

@ -55,7 +55,9 @@ class TagGroup < ActiveRecord::Base
def self.resolve_permissions(permissions)
permissions.map do |group, permission|
group_id = Group.group_id_from_param(group)
permission = TagGroupPermission.permission_types[permission] unless permission.is_a?(Integer)
permission = TagGroupPermission.permission_types[permission.to_sym] unless permission.is_a?(
Integer,
)
[group_id, permission]
end
end