Skip to content

Commit e9cd01b

Browse files
committed
Replace deprecated force_text with force_str
1 parent 2967833 commit e9cd01b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

import_export_celery/tasks.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
from django.core.mail import send_mail
1111

1212
from django.urls import reverse
13-
from django.utils.encoding import force_text
13+
from django.utils.encoding import force_str
1414
from django.utils.translation import gettext_lazy as _
1515

1616
from import_export.formats.base_formats import DEFAULT_FORMATS
@@ -56,7 +56,7 @@ def _run_import_job(import_job, dry_run=True):
5656
try:
5757
data = import_job.file.read()
5858
if not import_format.is_binary():
59-
data = force_text(data, "utf8")
59+
data = force_str(data, "utf8")
6060
dataset = import_format.create_dataset(data)
6161
except UnicodeDecodeError as e:
6262
import_job.errors += _("Imported file has a wrong encoding: %s" % e) + "\n"

0 commit comments

Comments
 (0)