From 8377a98ca5a9d51f6cf705d75276cb0380fffad6 Mon Sep 17 00:00:00 2001 From: Claude Paroz Date: Sun, 22 Jan 2017 21:13:00 +0100 Subject: [PATCH] Removed obsolete force_text_recursive --- django/db/migrations/state.py | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/django/db/migrations/state.py b/django/db/migrations/state.py index d8b2560186..9e73fb20fd 100644 --- a/django/db/migrations/state.py +++ b/django/db/migrations/state.py @@ -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