Commit 2c4472cf by Kálmán Viktor

Merge branch 'issue-450' into 'master'

Fix vm state changed to XY on None message

Closes #450

See merge request !372
parents f167d598 1ea56dfd
Pipeline #83 passed with stage
in 0 seconds
......@@ -447,12 +447,17 @@ class Instance(AclBase, VirtualMachineDescModel, StatusModel, OperatedMixin,
if new_node is False: # None would be a valid value
new_node = self.node
# log state change
if new_node:
msg = ugettext_noop("vm state changed to %(state)s on %(node)s")
else:
msg = ugettext_noop("vm state changed to %(state)s")
try:
act = InstanceActivity.create(
code_suffix='vm_state_changed',
readable_name=create_readable(
ugettext_noop("vm state changed to %(state)s on %(node)s"),
state=new_state, node=new_node),
readable_name=create_readable(msg, state=new_state,
node=new_node),
instance=self)
except ActivityInProgressError:
pass # discard state change if another activity is in progress.
......
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