mirror of https://github.com/django/django.git
Removed obsolete force_text_recursive
This commit is contained in:
parent
6e55e1d88a
commit
8377a98ca5
|
@ -454,8 +454,6 @@ class ModelState:
|
|||
options[name] = set(normalize_together(it))
|
||||
else:
|
||||
options[name] = model._meta.original_attrs[name]
|
||||
# Force-convert all options to str (#23226)
|
||||
options = cls.force_text_recursive(options)
|
||||
# If we're ignoring relationships, remove all field-listing model
|
||||
# options (that option basically just means "make a stub model")
|
||||
if exclude_rels:
|
||||
|
@ -533,21 +531,6 @@ class ModelState:
|
|||
managers,
|
||||
)
|
||||
|
||||
@classmethod
|
||||
def force_text_recursive(cls, value):
|
||||
if isinstance(value, list):
|
||||
return [cls.force_text_recursive(x) for x in value]
|
||||
elif isinstance(value, tuple):
|
||||
return tuple(cls.force_text_recursive(x) for x in value)
|
||||
elif isinstance(value, set):
|
||||
return set(cls.force_text_recursive(x) for x in value)
|
||||
elif isinstance(value, dict):
|
||||
return {
|
||||
cls.force_text_recursive(k): cls.force_text_recursive(v)
|
||||
for k, v in value.items()
|
||||
}
|
||||
return value
|
||||
|
||||
def construct_managers(self):
|
||||
"Deep-clone the managers using deconstruction"
|
||||
# Sort all managers by their creation counter
|
||||
|
|
Loading…
Reference in New Issue