Browse Source

remove spurious warning: shortterm capsuls that were already deleted

main
forest 2 months ago
parent
commit
41fee9062c
  1. 2
      capsulflask/cli.py

2
capsulflask/cli.py

@ -318,7 +318,7 @@ def delete_shortterm_vms_if_account_is_empty():
vms = get_model().list_vms_for_account(account['email'])
payments = get_model().list_payments_for_account(account['email'])
balance = get_account_balance(vms, payments, datetime.utcnow())
shortterm_vms = list(filter(lambda vm: vm['shortterm'] == True, vms))
shortterm_vms = list(filter(lambda vm: vm['shortterm'] == True and not vm['deleted'], vms))
if len(shortterm_vms) > 0 and balance <= 0:

Loading…
Cancel
Save