Fix 500 error on Capsuls page
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
3wc 2021-07-11 23:47:12 +02:00
parent 49dca12719
commit 76ec57689f

View File

@ -274,6 +274,8 @@ def create():
public_keys_for_account, public_keys_for_account,
request.form) request.form)
if len(errors) == 0: if len(errors) == 0:
for error in errors:
flash(error)
return redirect(f"{url_for('console.index')}?created={id}") return redirect(f"{url_for('console.index')}?created={id}")
affordable_vm_sizes = dict() affordable_vm_sizes = dict()
@ -284,9 +286,6 @@ def create():
if vm_size["dollars_per_month"] <= account_balance+0.25: if vm_size["dollars_per_month"] <= account_balance+0.25:
affordable_vm_sizes[key] = vm_size affordable_vm_sizes[key] = vm_size
for error in errors:
flash(error)
if not capacity_avaliable: if not capacity_avaliable:
current_app.logger.warning(f"when capsul capacity is restored, send an email to {session['account']}") current_app.logger.warning(f"when capsul capacity is restored, send an email to {session['account']}")