|
|
|
@ -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: |
|
|
|
|
|
|
|
|
|