From 4930a4f7663cba676e0f833ed455db719c67bccc Mon Sep 17 00:00:00 2001 From: Guillaume Boutry Date: Thu, 27 Jun 2024 13:44:44 +0200 Subject: [PATCH] fix(model): fix wrong instanciation of list-secrets facade ListSecrets facade takes 2 arguments: `filter_`, and `show_secrets`. Previous instanciation passed a dict, which then landed in `filter_` field. Fix #947 --- juju/model.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/juju/model.py b/juju/model.py index 45faa99e2..a51944de3 100644 --- a/juju/model.py +++ b/juju/model.py @@ -2704,15 +2704,15 @@ async def update_secret(self, name, data_args=[], new_name="", file="", info="") if result_error.error is not None: raise JujuAPIError(result_error.error) - async def list_secrets(self, filter="", show_secrets=False): + async def list_secrets(self, filter=None, show_secrets=False): """ Returns the list of available secrets. """ facade = client.SecretsFacade.from_connection(self.connection()) - results = await facade.ListSecrets({ - 'filter': filter, - 'show-secrets': show_secrets, - }) + results = await facade.ListSecrets( + filter_=filter, + show_secrets=show_secrets, + ) return results.results async def remove_secret(self, secret_name, revision=-1):