Fix GetAccountResp data parsing

This commit is contained in:
clerie 2022-01-06 23:58:59 +01:00
parent 5d8affbb5f
commit c63ecf7781
2 changed files with 4 additions and 3 deletions

View File

@ -44,9 +44,10 @@ class OMMClient2:
:param id: User id
"""
r = self.session.request(message.GetAccount(id))
r = self.session.request(messages.GetAccount(id))
r.raise_on_error()
if r.account is None:
return None
return r.account[0]
def ping(self):

View File

@ -24,4 +24,4 @@ class GetAccount(Request):
class GetAccountResp(Response):
@property
def account(self):
return self.attrs.get("account")
return self.childs.get("account")