mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-09-15 14:31:18 +03:00
Fix creating Qemu disk image. Fixes #2542
This commit is contained in:
parent
7f45cc6f47
commit
600d3d38da
@ -96,7 +96,13 @@ async def create_qemu_image(
|
|||||||
await Qemu.instance().create_disk_image(disk_image_path, options)
|
await Qemu.instance().create_disk_image(disk_image_path, options)
|
||||||
|
|
||||||
image_info = await read_image_info(disk_image_path, "qemu")
|
image_info = await read_image_info(disk_image_path, "qemu")
|
||||||
return await images_repo.add_image(**image_info)
|
|
||||||
|
image = await images_repo.get_image(disk_image_path)
|
||||||
|
if image:
|
||||||
|
# the image has already been added to the database
|
||||||
|
return image
|
||||||
|
else:
|
||||||
|
return await images_repo.add_image(**image_info)
|
||||||
|
|
||||||
@router.get(
|
@router.get(
|
||||||
"",
|
"",
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user