Make changed result accurate for credentials

This commit is contained in:
Elijah DeLee 2021-06-07 17:16:14 -04:00
parent 326184da0f
commit e2b0a4f7a7

View File

@ -81,13 +81,13 @@ class Command(BaseCommand):
"username": options.get("registry_username"),
"verify_ssl": options.get("verify_ssl"),
}
registry_cred.inputs = inputs
registry_cred.save()
changed = True
if not cred_created:
print("Updated 'Default Execution Environment Credential'")
for key, value in inputs.items():
if registry_cred.get_input(key) != value:
registry_cred.inputs[key] = value
changed = True
if changed:
registry_cred.save()
print("'Default Execution Environment Credential' updated.")
# Create default globally available Execution Environments
for ee in reversed(settings.GLOBAL_JOB_EXECUTION_ENVIRONMENTS):