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

group - fix setting explicitly empty members #144

Merged
merged 2 commits into from
Aug 20, 2024

Conversation

jborean93
Copy link
Collaborator

SUMMARY

Add a fix when attempting to create a group with an explicitly empty set of members. This fix also applies to any other add/set/remove attribute when the resulting value is an empty value. The error only applied when creating the AD object as the New-AD* -OtherAttributes parameter could not handle an empty array value.

Fixes: #141

ISSUE TYPE
  • Bugfix Pull Request
COMPONENT NAME

microsoft.ad.group (and others)

Copy link

Add a fix when attempting to create a group with an explicitly empty set
of members. This fix also applies to any other add/set/remove attribute
when the resulting value is an empty value. The error only applied when
creating the AD object as the `New-AD* -OtherAttributes` parameter could
not handle an empty array value.
Copy link

@@ -1293,6 +1295,7 @@ Function Invoke-AnsibleADObject {
$adObject = & $newCommand @newParams @adParams
}
catch {
$module.Result.zzz = $newParams
Copy link
Contributor

Choose a reason for hiding this comment

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

zzz? was this a debugging thing?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It was, thanks for picking it up.

Copy link
Contributor

@briantist briantist left a comment

Choose a reason for hiding this comment

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

lgtm, thanks for the fix!

Copy link

@jborean93
Copy link
Collaborator Author

jborean93 commented Aug 20, 2024

No worries, thanks for the bug report and reviewing.

@jborean93 jborean93 merged commit 33c981a into ansible-collections:main Aug 20, 2024
19 checks passed
@jborean93 jborean93 deleted the group-member branch August 20, 2024 18:50
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.

microsoft.ad.group fails with members.set set to an empty list on new objects
2 participants