From edbc9d11ff07f4a87ac500b4a48dd06798cacbcf Mon Sep 17 00:00:00 2001 From: Dan Glass <38985237+super-lumic@users.noreply.github.com> Date: Mon, 6 Feb 2023 09:41:08 +0000 Subject: [PATCH] [4.2.x] Made PostgreSQL's SchemaEditor._create_index_sql() respect the "sql" argument. Backport of bd366ca2aeffa869b7dbc0b0aa01caea75e6dc31 from main --- django/db/backends/postgresql/schema.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/django/db/backends/postgresql/schema.py b/django/db/backends/postgresql/schema.py index 321fa530aa..19f8b225e2 100644 --- a/django/db/backends/postgresql/schema.py +++ b/django/db/backends/postgresql/schema.py @@ -353,7 +353,7 @@ class DatabaseSchemaEditor(BaseDatabaseSchemaEditor): include=None, expressions=None, ): - sql = ( + sql = sql or ( self.sql_create_index if not concurrently else self.sql_create_index_concurrently