1
0
Fork 0
mirror of https://github.com/retspen/webvirtcloud synced 2024-12-25 15:45:23 +00:00

Merge pull request #11 from hico-horiuchi/user_instances

Show only UserInstances at instances
This commit is contained in:
Anatoliy Guskov 2015-05-21 18:53:08 +03:00
commit 1bc1279b1d

View file

@ -47,7 +47,7 @@ def instances(request):
computes = Compute.objects.all()
if not request.user.is_superuser:
user_instances = UserInstance.objects.all()
user_instances = UserInstance.objects.filter(user_id=request.user.id)
for usr_inst in user_instances:
if connection_manager.host_is_up(usr_inst.instance.compute.type,
usr_inst.instance.compute.hostname):