mirror of
https://gitlab.gnome.org/World/Authenticator.git
synced 2025-03-04 08:44:40 +01:00
Merge branch 'tags-issue' into 'master'
account.py: Check if tags are empty before setting provider See merge request World/Authenticator!107
This commit is contained in:
commit
a43ed01eed
1 changed files with 5 additions and 1 deletions
|
@ -69,8 +69,12 @@ class Account(GObject.GObject):
|
|||
|
||||
@staticmethod
|
||||
def create_from_json(json_obj):
|
||||
tags = json_obj["tags"]
|
||||
if not tags:
|
||||
provider = _("Default")
|
||||
else:
|
||||
provider = tags[0]
|
||||
|
||||
provider = json_obj.get("tags", [_("Default")])[0].strip()
|
||||
return Account.create(json_obj["label"], provider, json_obj["secret"])
|
||||
|
||||
@staticmethod
|
||||
|
|
Loading…
Add table
Reference in a new issue