microsoft / microsoft/azure-devops-python-api
Profile object does not deserialize `core_attributes` correctly (?)
还没有人认领这个 Issue。
- 主要语言
- Python
- 星标
- 684
- 派生
- 218
- 平均合并
- 8 天 10 小时
- 30 天内合并 PR
- 1
描述
I am trying to get some profiles by id and I cannot figure out if there is a bug in this library or if I am not using it correctly, but when I get a profile with a call like:
profile_client = connection.clients_v6_0.get_profile_client()
a_profile = profile_client.get_profile(authenticated_user_id, details=True)
I see that data like the Avatar is coming back from the http request log
...
'Avatar': {'descriptor': {'attributeName': 'Avatar',
'containerName': 'Core'},
'value': {'value': 'iVBORw0KGgoAAAANSUhEUgAAACwAAAAsCAYAAAAehFoBAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAGQSURBVFhH7ZUxSwQxEEb9Odb29va2cpWVWIqdjWB7FldoowhWilhpo811FoqdhYVgpaU/IfIC3zEXs8seZBBlBh6bTXKbl2SSW9pYnqS/RAh7E8LehLA3IexNCHsTwt6EsDf/X3h79TSNt27S2f40Q5k622dv/SK38bT1JZsrx7Nv1NprDBbm49Orl0TcnjzPhF+fPnKd7Us98fn+NVdfon6P92/V9hqDhJFFDGHKZfvO2vncOyLIEn2rTNCvuTArinCtrYZWjgl2yZAGkm0qTH4Si+SZhFldosxxQJZ+zYUPRtd50FoqdCFhyuwMO2TbNRG+2VzYDm6xNwXYVbS/oR9hJ4ygJtFc+Gj37seAIGEGJuzhssKg7aesFNMEmwtzAxCkRq1d29snzDvSlJmgFWwuDH1XzxBhdofQbtm+LsJa5fLwwBBhUOpopYWLMCDNYHB5+JClePJO2D+PmnDX9egmLFhJhATv5YFUH1sHpETt8JaT6GNh4d8mhL0JYW9C2JsQ9iaEvQlhb0LYl0n6Bknoed5LlvAdAAAAAElFTkSuQmCC',
'timeStamp': '2020-12-09T16:53:10.5466667+00:00',
'size': 'medium',
'isAutoGenerated': True},
'timeStamp': '2020-12-09T16:53:10.5466667+00:00'},
...
but if I serialize the Profile object, I do not see anything
a_profile.as_dict()
...
{'core_attributes': {'DisplayName': {},
'PublicAlias': {},
'EmailAddress': {},
'UnconfirmedEmailAddress': {},
'CountryName': {},
'TermsOfServiceVersion': {},
'TermsOfServiceAcceptDate': {},
'Avatar': {},
'ContactWithOffers': {}},
...
and even if I get the Avatar object from a_profile.core_attributes, the object does not seem to contain anything.
Is there a problem with the library or I am not using it correctly?
Thanks a lot in advance e for your help.
贡献指南
这个仓库没有索引到贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
从 get_profile(..., details=True) 调用开始,将记录的 HTTP 响应与 a_profile.as_dict() 和 a_profile.core_attributes 进行比较。跟踪返回的 core_attributes(尤其是 Avatar)在反序列化期间的表示方式;当序列化后的 Profile 保留响应中存在的值时,即表示完成。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- python
- 领域
- api
- Issue 类型
- 缺陷
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 活跃度
- 停滞
- 描述清晰度
- 需要澄清
- 新手友好度
- 30/100