Projet

Général

Profil

Bug #40624

AttributeError: 'NoneType' object has no attribute 'sort'

Ajouté par Sentry Io il y a environ 4 ans. Mis à jour il y a environ 4 ans.

Statut:
Fermé
Priorité:
Normal
Assigné à:
Version cible:
-
Début:
10 mars 2020
Echéance:
% réalisé:

0%

Temps estimé:
Patch proposed:
Oui
Planning:
Non

Description

https://sentry.entrouvert.org/entrouvert/publik/issues/823/

AttributeError: 'NoneType' object has no attribute 'sort'
  File "passerelle/utils/jsonresponse.py", line 128, in api
    resp = f(*args, **kwargs)
  File "passerelle/views.py", line 467, in perform
    result = self.endpoint(request, **params)
  File "passerelle/contrib/mdph13/models.py", line 222, in link
    ip=ip)
  File "passerelle/contrib/mdph13/models.py", line 356, in create_or_update
    ip=ip)
  File "passerelle/contrib/mdph13/models.py", line 129, in call_situation_dossier
    demandes.sort(key=lambda demande: demande.get('date_demande') or '', reverse=True)

Error occurred while processing request

Fichiers

Révisions associées

Révision ce7018c8 (diff)
Ajouté par Lauréline Guérin il y a environ 4 ans

mdph13: fix disuation_dossier when no demandes (#40624)

Historique

#1

Mis à jour par Lauréline Guérin il y a environ 4 ans

  • Projet changé de Suivi des traces à Passerelle
#2

Mis à jour par Lauréline Guérin il y a environ 4 ans

  • Assigné à mis à Lauréline Guérin
#3

Mis à jour par Lauréline Guérin il y a environ 4 ans

#4

Mis à jour par Benjamin Dauvergne il y a environ 4 ans

  • Statut changé de Solution proposée à Solution validée
#5

Mis à jour par Valentin Deniaud il y a environ 4 ans

data.get('demandes', []) est plus répandu, non ?
(OK, c'est pour quand data['demandes'] is None, merci Thomas)

#6

Mis à jour par Lauréline Guérin il y a environ 4 ans

oui, mais si on a 'demandes': None dans le payload on a le même soucis :)

#7

Mis à jour par Lauréline Guérin il y a environ 4 ans

  • Statut changé de Solution validée à Résolu (à déployer)
commit ce7018c82df4b6ad4b0eb8354752e034aec5ad68
Author: Lauréline Guérin <zebuline@entrouvert.com>
Date:   Thu Mar 12 14:40:03 2020 +0100

    mdph13: fix disuation_dossier when no demandes (#40624)
#8

Mis à jour par Frédéric Péters il y a environ 4 ans

  • Statut changé de Résolu (à déployer) à Solution déployée

Formats disponibles : Atom PDF