Skip to content
Snippets Groups Projects
Commit 7e762748 authored by Jason Salyers's avatar Jason Salyers
Browse files

Merge branch '8-fix-handle-list' into 'autoclave'

Fix: assert for str type in get_id argument

Closes #8

See merge request !13
parents cb6054c2 0b66dbde
No related branches found
No related tags found
1 merge request!13Fix: assert for str type in get_id argument
...@@ -58,9 +58,7 @@ class Accounts: ...@@ -58,9 +58,7 @@ class Accounts:
@classmethod @classmethod
def get_id(cls, name): def get_id(cls, name):
"""Get account id by name. Throw if not found.""" """Get account id by name. Throw if not found."""
if isinstance(name, list): assert isinstance(name, str), "account name should be string"
assert name[0] in cls._ids, "account does not exist or was not registered"
return cls._ids[name[0]]
assert name in cls._ids, "account does not exist or was not registered" assert name in cls._ids, "account does not exist or was not registered"
return cls._ids[name] return cls._ids[name]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment