From c424994ad179bf9358be6ef47828220e1cc97961 Mon Sep 17 00:00:00 2001 From: Kanishk Pachauri Date: Sat, 16 Nov 2024 04:12:02 +0530 Subject: [PATCH] fix: name filter in images.list() Signed-off-by: Kanishk Pachauri --- podman/domain/images_manager.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/podman/domain/images_manager.py b/podman/domain/images_manager.py index 8edf2bc8..e19478c3 100644 --- a/podman/domain/images_manager.py +++ b/podman/domain/images_manager.py @@ -61,10 +61,13 @@ def list(self, **kwargs) -> List[Image]: Raises: APIError: when service returns an error """ + filters = kwargs.get("filters", {}).copy() + if name := kwargs.get("name"): + filters["reference"] = name + params = { "all": kwargs.get("all"), - "name": kwargs.get("name"), - "filters": api.prepare_filters(kwargs.get("filters")), + "filters": api.prepare_filters(filters=filters), } response = self.client.get("/images/json", params=params) if response.status_code == requests.codes.not_found: