Fix adding account when none were previously saved

This commit is contained in:
miruka 2020-05-22 08:48:58 -04:00
parent 9f8c28e1db
commit 562e1431b9

View File

@ -192,10 +192,10 @@ class Accounts(JSONDataFile):
"token": client.access_token,
"device_id": client.device_id,
"enabled": True,
"order": max(
"order": max([
account.get("order", i)
for i, account in enumerate(saved.values())
) + 1,
] or [-1]) + 1,
},
})