mirror of
https://github.com/retspen/webvirtcloud
synced 2025-01-12 16:35:17 +00:00
Show only UserInstances at instances
This commit is contained in:
parent
56b1cdc518
commit
172a805215
1 changed files with 1 additions and 1 deletions
|
@ -47,7 +47,7 @@ def instances(request):
|
||||||
computes = Compute.objects.all()
|
computes = Compute.objects.all()
|
||||||
|
|
||||||
if not request.user.is_superuser:
|
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:
|
for usr_inst in user_instances:
|
||||||
if connection_manager.host_is_up(usr_inst.instance.compute.type,
|
if connection_manager.host_is_up(usr_inst.instance.compute.type,
|
||||||
usr_inst.instance.compute.hostname):
|
usr_inst.instance.compute.hostname):
|
||||||
|
|
Loading…
Reference in a new issue