mirror of
https://github.com/django/django.git
synced 2025-08-04 19:08:28 +00:00
Refs #23919 -- Removed unneeded force_str calls
This commit is contained in:
parent
bf1c957027
commit
dc8834cad4
44 changed files with 100 additions and 167 deletions
|
@ -4,7 +4,7 @@ import os
|
|||
|
||||
from django.core.files.uploadedfile import UploadedFile
|
||||
from django.http import HttpResponse, HttpResponseServerError
|
||||
from django.utils.encoding import force_bytes, force_str
|
||||
from django.utils.encoding import force_bytes, force_text
|
||||
|
||||
from .models import FileModel
|
||||
from .tests import UNICODE_FILENAME, UPLOAD_TO
|
||||
|
@ -152,9 +152,7 @@ def file_upload_content_type_extra(request):
|
|||
"""
|
||||
params = {}
|
||||
for file_name, uploadedfile in request.FILES.items():
|
||||
params[file_name] = {
|
||||
k: force_str(v) for k, v in uploadedfile.content_type_extra.items()
|
||||
}
|
||||
params[file_name] = {k: force_text(v) for k, v in uploadedfile.content_type_extra.items()}
|
||||
return HttpResponse(json.dumps(params))
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue