In the details page of a VM, we require some information about the VM's image. This is currently done using the following Django query:
image_info = Image.objects.get(uuid=vm.imageid)
This is wrong though, since the uuid in the Image model is not unique. What's unique is the combination of image uuid and image version. Therefore, the query must change in this:
In the details page of a VM, we require some information about the VM's image. This is currently done using the following Django query:
image_info = Image.objects.get(uuid=vm.imageid)
This is wrong though, since the uuid in the Image model is not unique. What's unique is the combination of image uuid and image version. Therefore, the query must change in this:
image_info = Image.objects.get(uuid=vm.imageid, version=vm.image_version)