summaryrefslogtreecommitdiff
path: root/django/db/backends/mysql/base.py
diff options
context:
space:
mode:
Diffstat (limited to 'django/db/backends/mysql/base.py')
-rw-r--r--django/db/backends/mysql/base.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/django/db/backends/mysql/base.py b/django/db/backends/mysql/base.py
index 8fcc9e0db1..dcb22bc37c 100644
--- a/django/db/backends/mysql/base.py
+++ b/django/db/backends/mysql/base.py
@@ -396,6 +396,8 @@ class DatabaseOperations(BaseDatabaseOperations):
converters.append(self.convert_booleanfield_value)
if internal_type == 'UUIDField':
converters.append(self.convert_uuidfield_value)
+ if internal_type == 'TextField':
+ converters.append(self.convert_textfield_value)
return converters
def convert_booleanfield_value(self, value, field):
@@ -408,6 +410,11 @@ class DatabaseOperations(BaseDatabaseOperations):
value = uuid.UUID(value)
return value
+ def convert_textfield_value(self, value, field):
+ if value is not None:
+ value = force_text(value)
+ return value
+
class DatabaseWrapper(BaseDatabaseWrapper):
vendor = 'mysql'