Make non-required params actually optional, fix idempotency issues

This commit is contained in:
beeankha
2020-02-25 23:51:26 -05:00
parent 1c4042340c
commit b532012748
8 changed files with 24 additions and 16 deletions

View File

@@ -107,9 +107,10 @@ def main():
# Create the data that gets sent for create and update
team_fields = {
'name': new_name if new_name else name,
'description': description,
'organization': org_id
}
if description is not None:
team_fields['description'] = description
if state == 'absent':
# If the state was absent we can let the module delete it if needed, the module will handle exiting from this