From be9685a8813d6c77fd58724590e99efaef807c12 Mon Sep 17 00:00:00 2001 From: Lynne Date: Fri, 13 Sep 2019 11:56:38 +1000 Subject: [PATCH] don't 500 on instances without contact_account --- webui.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/webui.py b/webui.py index 4deacb6..26d8e46 100644 --- a/webui.py +++ b/webui.py @@ -287,7 +287,7 @@ def bot_accounts_add(): if r.status_code == 200: j = r.json() - if 'is_pro' in j['contact_account']: + if 'contact_account' in j and 'is_pro' in j['contact_account']: # gab instance error = "Gab instances are not supported." return render_template("bot_accounts_add.html", error = error) @@ -395,7 +395,7 @@ def bot_create(): session['instance_type'] = "Pleroma" session['step'] += 1 else: - if 'is_pro' in j['contact_account']: + if 'contact_account' in j and 'is_pro' in j['contact_account']: # gab instance session['error'] = "Gab instances are not supported." else: