Refs #23919 -- Removed force_text() in Python deserializer needed only on Python 2

This commit is contained in:
Claude Paroz 2017-04-27 09:39:56 +02:00
parent a8343fe7bf
commit 59f8118c86
1 changed files with 0 additions and 6 deletions

View File

@ -6,7 +6,6 @@ other serializers.
from collections import OrderedDict
from django.apps import apps
from django.conf import settings
from django.core.serializers import base
from django.db import DEFAULT_DB_ALIAS, models
from django.utils.encoding import force_text, is_protected_type
@ -116,11 +115,6 @@ def Deserializer(object_list, *, using=DEFAULT_DB_ALIAS, ignorenonexistent=False
# skip fields no longer on model
continue
if isinstance(field_value, str):
field_value = force_text(
field_value, options.get("encoding", settings.DEFAULT_CHARSET), strings_only=True
)
field = Model._meta.get_field(field_name)
# Handle M2M relations