From 76ec57689f833a34fa8537511d69c5c1b0b84ec2 Mon Sep 17 00:00:00 2001 From: 3wc <3wc.cyberia@doesthisthing.work> Date: Sun, 11 Jul 2021 23:47:12 +0200 Subject: [PATCH] Fix 500 error on Capsuls page --- capsulflask/console.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/capsulflask/console.py b/capsulflask/console.py index 0105177..8f1fb3e 100644 --- a/capsulflask/console.py +++ b/capsulflask/console.py @@ -274,6 +274,8 @@ def create(): public_keys_for_account, request.form) if len(errors) == 0: + for error in errors: + flash(error) return redirect(f"{url_for('console.index')}?created={id}") affordable_vm_sizes = dict() @@ -284,9 +286,6 @@ def create(): if vm_size["dollars_per_month"] <= account_balance+0.25: affordable_vm_sizes[key] = vm_size - for error in errors: - flash(error) - if not capacity_avaliable: current_app.logger.warning(f"when capsul capacity is restored, send an email to {session['account']}")