diff --git a/nautobot_plugin_nornir/plugins/credentials/nautobot_secrets.py b/nautobot_plugin_nornir/plugins/credentials/nautobot_secrets.py index 3eaf568..04ef1fa 100644 --- a/nautobot_plugin_nornir/plugins/credentials/nautobot_secrets.py +++ b/nautobot_plugin_nornir/plugins/credentials/nautobot_secrets.py @@ -129,10 +129,10 @@ def get_device_creds(self, device): for sec in device.secrets_group.secrets.all(): secret_value = self.creds_cache.get(self._get_or_cache_secret_key(device, sec)) current_secret_type = getattr( - SecretsGroupSecretTypeChoices, f"TYPE_{sec.secrets_group_associations.first().secret_type.upper()}" + SecretsGroupSecretTypeChoices, f"TYPE_{sec.secretsgroupassociation_set.first().secret_type.upper()}" ) current_access_type = getattr( - SecretsGroupAccessTypeChoices, f"TYPE_{sec.secrets_group_associations.first().access_type.upper()}" + SecretsGroupAccessTypeChoices, f"TYPE_{sec.secretsgroupassociation_set.first().access_type.upper()}" ) configured_access_type = _get_access_type_value(device) if (