DEV: Improve TagGroup.resolve_permissions method arg type handling (#28016)
This commit is contained in:
parent
215b1951e4
commit
30c4c29946
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue