microsoft / microsoft/azure-devops-python-api

Profile object does not deserialize `core_attributes` correctly (?)

Ouverte
#365 1 commentaire 0 réactions 0 personnes assignées Voir sur GitHub

Personne n'a encore pris cette issue.

Langage dominant
Python
Étoiles
684
Forks
218
Merge moyen
8 j 10 h
PR mergées (30 j)
1

Description

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.

Guide de contribution

Aucun guide de contribution indexé pour ce dépôt

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Piste de recherche

Commencez par l’appel get_profile(..., details=True) et comparez la réponse HTTP journalisée avec a_profile.as_dict() et a_profile.core_attributes. Suivez la manière dont les core_attributes renvoyés, en particulier Avatar, sont représentés lors de la désérialisation ; le travail est terminé lorsque le Profile sérialisé préserve les valeurs présentes dans la réponse.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Évaluation

Stack technique
python
Domaine
api
Type d'issue
Bug
Difficulté
3/5
Temps estimé
1-2 jours
Activité
À l'abandon
Clarté
À clarifier
Accessibilité débutants
30/100

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.