Skip to content
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

Passed the wrong usergroup.ID #141

Conversation

NielsZeilemaker
Copy link
Contributor

Got this error while trying to update (an existing userlist).

Error: could not update usergroup xyz: invalid_arguments

Looked at the code, and found this reference to createdUserGroup which should be nil (i think)

Copy link
Owner

@pablovarela pablovarela left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice catch! Yes, createUserGroup.ID would be nil in those cases because it failed to create the group and we are trying to re-enable an existing one, the ID of the existing group is returned by findUserGroupByName.

I don't fully understand how this affected the update though, as it executes a different function. But this is a bug anyway. Thanks for fixing it!

It would have been great to have a test for this bug. I will merge this PR and add the tests when I have some time.

@pablovarela
Copy link
Owner

Tests for this PR are not passing because I am having problems setting the credentials for external PRs. I run the tests locally and they all pass.

@pablovarela pablovarela merged commit d45ad88 into pablovarela:master Aug 30, 2022
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.

2 participants