Fixed #15534: Made the Oracle runtime test for regex capabilities use the !DatabaseOperations connection instead of grabbing the default connection.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@16041 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Ian Kelly 2011-04-18 21:59:20 +00:00
parent 487cd1fa23
commit b4c83138e9
1 changed files with 2 additions and 3 deletions

View File

@ -258,9 +258,8 @@ WHEN (new.%(col_name)s IS NULL)
def regex_lookup(self, lookup_type): def regex_lookup(self, lookup_type):
# If regex_lookup is called before it's been initialized, then create # If regex_lookup is called before it's been initialized, then create
# a cursor to initialize it and recur. # a cursor to initialize it and recur.
from django.db import connection self.connection.cursor()
connection.cursor() return self.connection.ops.regex_lookup(lookup_type)
return connection.ops.regex_lookup(lookup_type)
def return_insert_id(self): def return_insert_id(self):
return "RETURNING %s INTO %%s", (InsertIdVar(),) return "RETURNING %s INTO %%s", (InsertIdVar(),)