fix: send the docker force query parameter as a string

The aiohttp URL builder only accepts strings, ints and floats as query
values and raises a TypeError on a Python bool, so deleting an image
answered a 500. Send true/false like the controller does.
This commit is contained in:
YueGuobin committed 2026-11-06 14:31:26 +08:00
1 parent c1e03194d3
commit 54cfcef6e2
2 files changed
+4 -2

No files matched your search

+1 -1
View File
@@ -544,7 +544,7 @@ class Docker(BaseManager):
:param force: Remove the image even if a container uses it
"""
await self.query("DELETE", f"images/{image}", params={"force": force})
await self.query("DELETE", f"images/{image}", params={"force": str(force).lower()})
# the image id translation recorded when this image was synced from the
# controller no longer matches anything on this daemon
self._image_id_translations.pop(image, None)