Development #49797
crash quand un compte FC n'a pas d'infos associée
Début:
01 janvier 2021
Echéance:
% réalisé:
0%
Temps estimé:
Hors marché:
Non
Patch proposed:
Oui
Planning:
Non
Description
Internal Server Error: /api/users/ ... File "/usr/lib/python3/dist-packages/rest_framework/serializers.py" in to_representation 527. ret[field.field_name] = field.to_representation(attribute) File "/usr/lib/python3/dist-packages/rest_framework/fields.py" in to_representation 1893. return method(value) File "/usr/lib/python3/dist-packages/authentic2_cut/apps.py" in get_address_fc 301. return obj.fc_accounts.all()[0].get_user_info().get('address') File "/usr/lib/python3/dist-packages/authentic2_auth_fc/models.py" in get_user_info 115. return json.loads(self.user_info) File "/usr/lib/python3.7/json/__init__.py" in loads 341. raise TypeError(f'the JSON object must be str, bytes or bytearray, ' Exception Type: TypeError at /api/users/ Exception Value: the JSON object must be str, bytes or bytearray, not NoneType
(appel via un hook de authentic2-cut mais correction a priori à poser dans authentic2-auth-fc.
Fichiers
Demandes liées
Historique
Mis à jour par Benjamin Dauvergne il y a environ 3 ans
- Fichier 0001-auth_fc-always-fill-user_info-on-FcAccount-creation-.patch 0001-auth_fc-always-fill-user_info-on-FcAccount-creation-.patch ajouté
- Tracker changé de Bug à Development
- Statut changé de Nouveau à Solution proposée
- Patch proposed changé de Non à Oui
Mis à jour par Benjamin Dauvergne il y a environ 3 ans
- Statut changé de Solution proposée à En cours
Je vais tout traiter dans #52929.
Mis à jour par Benjamin Dauvergne il y a environ 3 ans
- Lié à Bug #52929: AttributeError: 'NoneType' object has no attribute 'fc_accounts' ajouté
Mis à jour par Benjamin Dauvergne il y a plus de 2 ans
- Statut changé de En cours à Fermé
Corrigé par #52929.