Fallback to account name when label is missing

Fixes #9236
This commit is contained in:
Philipp Hörist 2018-07-08 21:28:02 +02:00
parent 0750d6f6ef
commit c25a4a0aab
1 changed files with 2 additions and 1 deletions

View File

@ -397,7 +397,8 @@ def get_enabled_accounts_with_labels(exclude_local=True):
accounts = []
for acc in connections:
if not exclude_local or acc != 'Local':
acc_label = config.get_per('accounts', acc, 'account_label')
acc_label = config.get_per(
'accounts', acc, 'account_label') or acc
accounts.append([acc, acc_label])
accounts.sort(key=lambda xs: str.lower(xs[1]))
return accounts