Bug #23551
crash sur l'affichage des paiements
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
Révisions associées
Historique
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 :/
Mis à jour par Thomas Noël il y a presque 6 ans
- Fichier 0001-get_with_indexed_value-is-now-an-iterator-23551.patch 0001-get_with_indexed_value-is-now-an-iterator-23551.patch ajouté
- Statut changé de Nouveau à En cours
- Patch proposed changé de Non à Oui
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é
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)
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)
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
get_with_indexed_value is now an iterator (#23551)