Projet

Général

Profil

0003-api-replace-unicode-by-force_text-28962.patch

Benjamin Dauvergne, 17 décembre 2018 13:07

Télécharger (1,26 ko)

Voir les différences:

Subject: [PATCH 3/4] api: replace unicode by force_text (#28962)

 src/authentic2/api_views.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
src/authentic2/api_views.py
21 21
from django.contrib.auth import get_user_model
22 22
from django.core.exceptions import MultipleObjectsReturned
23 23
from django.utils.translation import ugettext as _
24
from django.utils.encoding import force_text
24 25
from django.views.decorators.vary import vary_on_headers
25 26
from django.views.decorators.cache import cache_control
26 27
from django.shortcuts import get_object_or_404
......
221 222
                    'errors': {
222 223
                        '__all__': ['Mail sending failed']
223 224
                    },
224
                    'exception': unicode(e),
225
                    'exception': force_text(e),
225 226
                }
226 227
                response_status = status.HTTP_503_SERVICE_UNAVAILABLE
227 228
            else:
228
-