0003-api-replace-unicode-by-force_text-28962.patch
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 |
- |