Commit 737f41d7 authored by Christos Stavrakakis's avatar Christos Stavrakakis
Browse files

Return the VM!

parent aaaa36f2
......@@ -167,6 +167,7 @@ def get_vm(server_id, user_id, non_deleted=False, non_suspended=False):
raise VirtualMachine.DeletedError
if non_suspended and vm.suspended:
raise Unauthorized("Administratively Suspended VM")
return vm
except ValueError:
raise BadRequest('Invalid server ID.')
except VirtualMachine.DoesNotExist:
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 to comment