Commit ef5fc895 by Őry Máté

one: fix typos

parent 6349f3f8
......@@ -481,19 +481,19 @@ class Instance(models.Model):
"""
Save image and shut down.
"""
imgname = "template-%d-%d" % (self.tempfile.id, self.id)
imgname = "template-%d-%d" % (self.template.id, self.id)
self._update_vm('<DISK id="0"><SAVE_AS name="%s"/></DISK>' % imgname)
self._change_state("SHUTDOWN")
def is_save_as_done(self):
self.update_state()
if self.state != DONE:
if self.state != 'DONE':
return false
Disk.update()
imgname = "template-%d-%d" % (self.tempfile.id, self.id)
imgname = "template-%d-%d" % (self.template.id, self.id)
disks = Disk.objects.filter(name=imgname)
if len(disks) != 1:
return false
self.template.disk_id = disks[1].id
self.template.disk_id = disks[0].id
self.template.save()
return True
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment