Projet

Général

Profil

0001-py3-convert-encode-query-to-text-44464.patch

Voir les différences:

Subject: [PATCH] py3: convert encode query to text (#44464)

 passerelle_montpellier_sig/views.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
passerelle_montpellier_sig/views.py
149 149
            voies.append({'id': voie, 'text': prefix_cleanup(voie)})
150 150

  
151 151
        if 'q' in request.GET and request.GET['q']:
152
            q = force_text(request.GET['q']).upper()
152
            q = request.GET['q'].upper()
153 153
            q = q.replace("'", ' ')
154 154
            q = unicodedata.normalize('NFKD', q).encode('ascii', 'ignore')
155
            q = force_text(q)
155 156
            voies = [v for v in voies if q in v['text']]
156 157

  
157 158
        voies.sort(lambda x, y: cmp(x['id'], y['id']))
158
-