forked from 3wordchant/capsul-flask
add 25 cent buffer to affordable_vm_sizes logic for UX
This commit is contained in:
parent
280bcfd584
commit
c849ec3c11
@ -209,7 +209,10 @@ def create():
|
||||
|
||||
affordable_vm_sizes = dict()
|
||||
for key, vm_size in vm_sizes.items():
|
||||
if vm_size["dollars_per_month"] <= account_balance:
|
||||
# if a user deposits $7.50 and then creates an f1-s vm which costs 7.50 a month,
|
||||
# then they have to delete the vm and re-create it, they will not be able to, they will have to pay again.
|
||||
# so for UX it makes a lot of sense to give a small margin of 25 cents for usability sake
|
||||
if vm_size["dollars_per_month"] <= account_balance+0.25:
|
||||
affordable_vm_sizes[key] = vm_size
|
||||
|
||||
for error in errors:
|
||||
|
Loading…
Reference in New Issue
Block a user