Removed obsolete force_text_recursive

This commit is contained in:
Claude Paroz 2017-01-22 21:13:00 +01:00
parent 6e55e1d88a
commit 8377a98ca5
1 changed files with 0 additions and 17 deletions

View File

@ -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