--- a/web/lib/django/db/backends/mysql/validation.py Wed May 19 17:43:59 2010 +0200
+++ b/web/lib/django/db/backends/mysql/validation.py Tue May 25 02:43:45 2010 +0200
@@ -11,8 +11,7 @@
characters if they have a unique index on them.
"""
from django.db import models
- from django.db import connection
- db_version = connection.get_server_version()
+ db_version = self.connection.get_server_version()
varchar_fields = (models.CharField, models.CommaSeparatedIntegerField,
models.SlugField)
if isinstance(f, varchar_fields) and f.max_length > 255:
@@ -25,4 +24,3 @@
if msg:
errors.add(opts, msg % {'name': f.name, 'cls': f.__class__.__name__, 'version': '.'.join([str(n) for n in db_version[:3]])})
-