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

@@ -238,7 +238,6 @@ def main():
# Create the data that gets sent for create and update
project_fields = {
'name': name,
'description': description,
'scm_type': scm_type,
'scm_url': scm_url,
'scm_branch': scm_branch,
@@ -251,6 +250,8 @@ def main():
'scm_update_cache_timeout': scm_update_cache_timeout,
'custom_virtualenv': custom_virtualenv,
}
if description is not None:
project_fields['description'] = description
if scm_credential is not None:
project_fields['credential'] = scm_credential_id
if scm_allow_override is not None: