From 3c9aaaef34366431773e1fd1fab65bbee42a9c24 Mon Sep 17 00:00:00 2001 From: Malcolm Tredinnick Date: Wed, 17 Dec 2008 01:50:11 +0000 Subject: [PATCH] Fixed a typo in r9652. Backport of r9659 from trunk. git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@9660 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- django/db/backends/mysql/validation.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/django/db/backends/mysql/validation.py b/django/db/backends/mysql/validation.py index 3014d7bae5d33..0b3d4ad0bd24f 100644 --- a/django/db/backends/mysql/validation.py +++ b/django/db/backends/mysql/validation.py @@ -18,7 +18,7 @@ def validate_field(self, errors, opts, f): if isinstance(f, varchar_fields) and f.max_length > 255: if db_version < (5, 0, 3): msg = '"%(name)s": %(cls)s cannot have a "max_length" greater than 255 when you are using a version of MySQL prior to 5.0.3 (you are using %(version)s).' - if f.unique == True: + elif f.unique == True: msg = '"%(name)s": %(cls)s cannot have a "max_length" greater than 255 when using "unique=True".' else: msg = None