Commit 6b722a18 authored by Antoine Millet's avatar Antoine Millet
Browse files

Fixed migration job to use the new get_by_id method on db

parent 28a3c163
Loading
Loading
Loading
Loading
+2 −4
Original line number Diff line number Diff line
@@ -290,10 +290,8 @@ class ColdMigrationJob(BaseMigrationJob):
            raise JobCancelError('author have no right to migrate to this hv')

        # Update the VM object:
        try:
            self.manager.server.objects.update(ids=(vm_id,))
            vm = self.manager.server.objects.get_by_id(vm_id)
        except UnknownObjectError:
        vm = self.manager.server.db.get_by_id(vm_id)
        if vm is None:
            raise JobCancelError('Source VM not found')

        # Get the source and destination hv clients: