Skip to content

Commit

Permalink
fix: name filter in images.list()
Browse files Browse the repository at this point in the history
Signed-off-by: Kanishk Pachauri <[email protected]>
  • Loading branch information
Mr-Sunglasses committed Nov 15, 2024
1 parent 8a6cb4f commit c424994
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions podman/domain/images_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit c424994

Please sign in to comment.