mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-11-20 21:25:14 +02:00
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:
2 files changed
+4
-2
No files matched your search
@@ -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)
|
||||
Reference in new issue
Block a user