Commit 5e2427f0 by Kálmán Viktor

vm: resource change precond fix

parent c1d95d96
...@@ -612,7 +612,7 @@ class ResourcesOperation(InstanceOperation): ...@@ -612,7 +612,7 @@ class ResourcesOperation(InstanceOperation):
def check_precond(self): def check_precond(self):
super(ResourcesOperation, self).check_precond() super(ResourcesOperation, self).check_precond()
if self.instance.status in ['RUNNING']: if self.instance.status not in ["STOPPED", "PENDING"]:
raise self.instance.WrongStateError(self.instance) raise self.instance.WrongStateError(self.instance)
def check_auth(self, user): def check_auth(self, user):
......
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