diff --git a/psqlextra/backend/base.py b/psqlextra/backend/base.py index c8ae73c..58222dd 100644 --- a/psqlextra/backend/base.py +++ b/psqlextra/backend/base.py @@ -2,6 +2,7 @@ from typing import TYPE_CHECKING +from django import VERSION from django.conf import settings from django.contrib.postgres.signals import ( get_hstore_oids, @@ -45,6 +46,9 @@ class DatabaseWrapper(Wrapper): def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) + if VERSION >= (5, 0): + return + # Some base back-ends such as the PostGIS back-end don't properly # set `ops_class` and `introspection_class` and initialize these # classes themselves.