Skip to content

Conversation

@myang0
Copy link

@myang0 myang0 commented Oct 23, 2020

Why?

The current procedure for adding members to a group is wrong.

What it did prior to this PR is that it would create an array containing the IDs of the members to be added to the group, and then the IDs of members already belonging to the group would be filtered out of that array. The line of code that accomplishes essentially does new_member_ids = new_member_ids - existing_member_ids. The problem is that at the moment, new_member_ids can be an array of either ints or strings, while existing_member_ids is always an array of ints. In the event that new_member_ids is an array of strings, the members may be still be added to the group even though they should be filtered out.

What?

Convert new_member_ids to an array of ints before filtering, such that existing IDs will filtered out regardless of the type.

@myang0 myang0 merged commit e590c5c into master Oct 26, 2020
@myang0 myang0 deleted the bugfix/member-id-to-int branch October 26, 2020 16:40
ErebusBat pushed a commit that referenced this pull request Oct 28, 2021
Update rake requirement from ~> 10.0 to ~> 13.0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants