-
Notifications
You must be signed in to change notification settings - Fork 436
groups.populate_users() only returns half of the users #197
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Can you try printing out the pagination_item that is returned from the populate_users call? Also, would it be possible to get the output from the following bit of code inserted after the populate_users call: import pprint
pprint.pprint(group.users) |
In this pass there were 12 users in the group, but only 10 were looped through. pagination_item: pprint: len(group.users) + print of each user.name: |
So after troubleshooting this more I figured out that the "server.groups.remove_user(clinicalGroup, user.id)" command alters the user items in "group.users", which is what caused the issue of not looping through each object. So I changed the code to build a separate list of all the users, then loop through that to do the remove user command. Closing this issue since it is apparently a user error on my part. |
Uh oh!
There was an error while loading. Please reload this page.
I've noticed groups.populate_users() only populates half of the user items in the group. In the screenshot below you'll notice that there were 18 users that are returned by "len(group.users)", but it only looped through 9 of them. If I change it to loop from 0 to the length of the object, I'll get an out of range error. I'm either doing something wrong or this is a bug. Not sure if it is related to #141 . My code is below...
The text was updated successfully, but these errors were encountered: