Project

General

Profile

Bug #45634

appel de |getlist sur une chaine

Added by Frédéric Péters 5 days ago. Updated 2 days ago.

Status:
Solution déployée
Priority:
Normal
Assignee:
Target version:
-
Start date:
31 Jul 2020
Due date:
% Done:

0%

Patch proposed:
Yes
Planning:
No

Description

Exception:
  type = '<class 'AttributeError'>', value = ''str' object has no attribute 'getlist''

Stack trace (most recent call first):
  File "/usr/lib/python3/dist-packages/wcs/qommon/templatetags/qommon.py", line 68, in getlist
    66 @register.filter
    67 def getlist(mapping, key):
>   68     return mapping.getlist(key)
    69
    70

  locals:
     key = 'montant'
     mapping = 'Liste de règlements'

Le gabarit en question :

     template = '<p>{% with f0=form_var_reglement_bis|getlist:"montant"|sum|decimal %}{{f0}}{% endwith %}</p>'

0001-misc-avoid-crashes-when-getlist-filter-not-used-on-a.patch View (1.78 KB) Thomas Noël, 31 Jul 2020 10:07 AM

Associated revisions

Revision 74b62af6 (diff)
Added by Thomas Noël 5 days ago

misc: avoid crashes when getlist filter not used on a block (#45634)

History

#1 Updated by Thomas Noël 5 days ago

  • Assignee set to Thomas Noël

#2 Updated by Thomas Noël 5 days ago

#3 Updated by Frédéric Péters 5 days ago

  • Status changed from Solution proposée to Solution validée

Ok.

#4 Updated by Thomas Noël 5 days ago

  • Status changed from Solution validée to Résolu (à déployer)
commit 74b62af6d7a94f5aa34188d4402761ddd6e2de37
Author: Thomas NOEL <tnoel@entrouvert.com>
Date:   Fri Jul 31 10:06:05 2020 +0200

    misc: avoid crashes when getlist filter not used on a block (#45634)

#5 Updated by Frédéric Péters 2 days ago

  • Status changed from Résolu (à déployer) to Solution déployée

Also available in: Atom PDF