Strip out deleted VMs before passing them to shell scripts
This commit is contained in:
parent
773aa78ac4
commit
e3f4de214c
@ -44,6 +44,7 @@ def double_check_capsul_address(id, ipv4):
|
||||
@account_required
|
||||
def index():
|
||||
vms = get_vms()
|
||||
vms = list(filter(lambda x: not x['deleted'], vms))
|
||||
created = request.args.get('created')
|
||||
|
||||
# this is here to prevent xss
|
||||
@ -63,8 +64,7 @@ def index():
|
||||
ipv4_status=("ok" if x['ipv4'] else "waiting-pulse"),
|
||||
os=x['os'],
|
||||
created=x['created'].strftime("%b %d %Y")
|
||||
),
|
||||
list(filter(lambda x: not x['deleted'], vms))
|
||||
), vms
|
||||
))
|
||||
|
||||
return render_template("capsuls.html", vms=vms, has_vms=len(vms) > 0, created=created)
|
||||
|
Loading…
Reference in New Issue
Block a user