mirror of
https://github.com/django/django.git
synced 2025-10-26 15:16:09 +00:00
Refs #28334 -- Fixed crash in hstore/citext oid caching during test db creation.
This commit is contained in:
@@ -5,6 +5,7 @@ from psycopg2 import ProgrammingError
|
||||
from psycopg2.extras import register_hstore
|
||||
|
||||
from django.db import connections
|
||||
from django.db.backends.base.base import NO_DB_ALIAS
|
||||
|
||||
|
||||
@functools.lru_cache()
|
||||
@@ -34,7 +35,7 @@ def get_citext_oids(connection_alias):
|
||||
|
||||
|
||||
def register_type_handlers(connection, **kwargs):
|
||||
if connection.vendor != 'postgresql':
|
||||
if connection.vendor != 'postgresql' or connection.alias == NO_DB_ALIAS:
|
||||
return
|
||||
|
||||
try:
|
||||
|
||||
Reference in New Issue
Block a user