summaryrefslogtreecommitdiff
path: root/django/db
diff options
context:
space:
mode:
authorMarc Tamlyn <marc.tamlyn@gmail.com>2014-05-19 14:57:06 +0100
committerMarc Tamlyn <marc.tamlyn@gmail.com>2014-05-19 14:57:06 +0100
commitecbabc216dd2fd30ee67ee75dd2a1d8a88e4f574 (patch)
treeb1717332fdf262a833170a29d7dbf69f01c1f029 /django/db
parent2f43229c2f044207f193e753baf1bd3fb6164da4 (diff)
Revert "Fixed regression from a2dd618e3b4a7472fab852da450ca5eef92a922f."
This reverts commit 5a2556afb9b1b3ef6e0622552970c67ac84ecd28.
Diffstat (limited to 'django/db')
-rw-r--r--django/db/backends/mysql/validation.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/django/db/backends/mysql/validation.py b/django/db/backends/mysql/validation.py
index 49c88377b7..cd7503a352 100644
--- a/django/db/backends/mysql/validation.py
+++ b/django/db/backends/mysql/validation.py
@@ -17,8 +17,7 @@ class DatabaseValidation(BaseDatabaseValidation):
if getattr(field, 'rel', None) is None:
field_type = field.db_type(connection)
- if (field_type is not None # Not all fields have a db_type (whyever...)
- and field_type.startswith('varchar') # Look for CharFields...
+ if (field_type.startswith('varchar') # Look for CharFields...
and field.unique # ... that are unique
and (field.max_length is None or int(field.max_length) > 255)):
errors.append(