mirror of
https://github.com/django/django.git
synced 2025-10-31 09:41:08 +00:00
Refs #27795 -- Replaced many force_text() with str()
Thanks Tim Graham for the review.
This commit is contained in:
@@ -13,7 +13,6 @@ from django.db import models
|
||||
from django.db.migrations.operations.base import Operation
|
||||
from django.db.migrations.utils import COMPILED_REGEX_TYPE, RegexObject
|
||||
from django.utils import datetime_safe
|
||||
from django.utils.encoding import force_text
|
||||
from django.utils.functional import LazyObject, Promise
|
||||
from django.utils.timezone import utc
|
||||
from django.utils.version import get_docs_version
|
||||
@@ -303,7 +302,7 @@ class UUIDSerializer(BaseSerializer):
|
||||
def serializer_factory(value):
|
||||
from django.db.migrations.writer import SettingsReference
|
||||
if isinstance(value, Promise):
|
||||
value = force_text(value)
|
||||
value = str(value)
|
||||
elif isinstance(value, LazyObject):
|
||||
# The unwrapped value is returned as the first item of the arguments
|
||||
# tuple.
|
||||
|
||||
Reference in New Issue
Block a user