Projet

Général

Profil

Bug #23551

crash sur l'affichage des paiements

Ajouté par Thomas Noël il y a presque 6 ans. Mis à jour il y a plus de 5 ans.

Statut:
Fermé
Priorité:
Immediat
Assigné à:
Catégorie:
-
Version cible:
-
Début:
03 mai 2018
Echéance:
% réalisé:

0%

Temps estimé:
Patch proposed:
Oui
Planning:

Description

Sur https://....au-quotidien.com/backoffice/payments/regie/1/ :

  type = '<type 'exceptions.AttributeError'>', value = ''generator' object has no attribute 'sort''

Stack trace (most recent call first):
  File "/usr/lib/python2.7/dist-packages/auquotidien/modules/payments_ui.py", line 371, in get_invoices
   369             reverse = False
   370             key = lambda i: getattr(i, sort_by) or ''
>  371         invoices.sort(reverse=reverse, key=key)
   372         return invoices
   373

  locals:
     invoices = <generator object get_with_indexed_value at 0x7f880b673e10>
     key = <function <lambda> at 0x7f881b842a28>
     reverse = True
     self = <auquotidien.modules.payments_ui.RegieDirectory object at 0x7f8811bc56d0>
     sort_by = 'date'

  File "/usr/lib/python2.7/dist-packages/auquotidien/modules/payments_ui.py", line 432, in invoice_listing
   430         r += htmltext('</tr>')
   431         r += htmltext('</thead>')
>  432         invoices = self.get_invoices()
   433         for invoice in invoices[offset:offset+self.PAGINATION]:
   434             r += htmltext('<tbody class="invoice-rows">')


Fichiers


Demandes liées

Lié à w.c.s. - Development #23180: sql : changer le get_with_indexed_value pour être un générateurFermé13 avril 2018

Actions

Révisions associées

Révision 51889bd5 (diff)
Ajouté par Thomas Noël il y a presque 6 ans

get_with_indexed_value is now an iterator (#23551)

Historique

#1

Mis à jour par Thomas Noël il y a presque 6 ans

Parce que #23180 a fait de get_with_indexed_value un itérateur :/

#2

Mis à jour par Thomas Noël il y a presque 6 ans

  • Assigné à mis à Thomas Noël
#3

Mis à jour par Thomas Noël il y a presque 6 ans

#4

Mis à jour par Thomas Noël il y a presque 6 ans

  • Lié à Development #23180: sql : changer le get_with_indexed_value pour être un générateur ajouté
#5

Mis à jour par Thomas Noël il y a presque 6 ans

  • Priorité changé de Normal à Immediat

(assez sûr de moi, et parce que ça faisait un gros crash sur Noyelles, j'ai posé le patch sur la prod sans attendre de relecture)

(mais bien sûr, relecture bienvenue)

#6

Mis à jour par Benjamin Dauvergne il y a presque 6 ans

Ack.

#7

Mis à jour par Thomas Noël il y a presque 6 ans

  • Statut changé de En cours à Résolu (à déployer)
commit 51889bd56741b64e735a60a587cec3420e6cfed7
Author: Thomas NOEL <tnoel@entrouvert.com>
Date:   Thu May 3 11:36:26 2018 +0200

    get_with_indexed_value is now an iterator (#23551)

#8

Mis à jour par Frédéric Péters il y a plus de 5 ans

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

Formats disponibles : Atom PDF