1
0
Fork 0
mirror of https://github.com/Lynnesbian/FediBooks/ synced 2024-11-25 08:38:59 +00:00

don't 500 on instances without contact_account

This commit is contained in:
Lynne Megido 2019-09-13 11:56:38 +10:00
parent ea8e46c07c
commit be9685a881

View file

@ -287,7 +287,7 @@ def bot_accounts_add():
if r.status_code == 200: if r.status_code == 200:
j = r.json() j = r.json()
if 'is_pro' in j['contact_account']: if 'contact_account' in j and 'is_pro' in j['contact_account']:
# gab instance # gab instance
error = "Gab instances are not supported." error = "Gab instances are not supported."
return render_template("bot_accounts_add.html", error = error) return render_template("bot_accounts_add.html", error = error)
@ -395,7 +395,7 @@ def bot_create():
session['instance_type'] = "Pleroma" session['instance_type'] = "Pleroma"
session['step'] += 1 session['step'] += 1
else: else:
if 'is_pro' in j['contact_account']: if 'contact_account' in j and 'is_pro' in j['contact_account']:
# gab instance # gab instance
session['error'] = "Gab instances are not supported." session['error'] = "Gab instances are not supported."
else: else: