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:
parent
ea8e46c07c
commit
be9685a881
1 changed files with 2 additions and 2 deletions
4
webui.py
4
webui.py
|
@ -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:
|
||||||
|
|
Loading…
Reference in a new issue