mirror of
https://github.com/ansible/awx.git
synced 2026-05-19 14:57:39 -02:30
allow encrypted fields in custom credentials to be empty
This commit is contained in:
@@ -383,6 +383,8 @@ class Credential(PasswordFieldsModel, CommonModelNameNotUnique, ResourceMixin):
|
||||
super(Credential, self).save(*args, **kwargs)
|
||||
|
||||
def encrypt_field(self, field, ask):
|
||||
if not hasattr(self, field):
|
||||
return None
|
||||
encrypted = encrypt_field(self, field, ask=ask)
|
||||
if encrypted:
|
||||
self.inputs[field] = encrypted
|
||||
|
||||
Reference in New Issue
Block a user