Wrote corresponding tests.

Updated verbiage to be more in line with existing messages.
This commit is contained in:
Lila
2022-05-12 15:49:09 -04:00
parent f6fb46d99e
commit 40279bc6c0
2 changed files with 44 additions and 1 deletions

View File

@@ -2667,7 +2667,7 @@ class CredentialSerializer(BaseSerializer):
def validate_inputs(self, inputs):
if self.instance and self.instance.credential_type.kind == "vault":
if 'vault_id' in inputs and inputs['vault_id'] != self.instance.inputs['vault_id']:
raise ValidationError(_('We do not permit Vault IDs to be changed after they have been created.'))
raise ValidationError(_('Vault IDs cannot be changed once they have been created.'))
return inputs