diff options
| author | Simon Charette <charette.s@gmail.com> | 2026-02-01 16:53:54 -0500 |
|---|---|---|
| committer | Jacob Walls <jacobtylerwalls@gmail.com> | 2026-03-19 12:24:17 -0400 |
| commit | f05fac88c4699c6d04a8f1ac3328cf6c7bd39228 (patch) | |
| tree | 2399222aaed0ad6d9e466e914d178f08cd6e8337 /tests/foreign_object | |
| parent | 4b2b4bf0ac2707dc9c4d51cabfa72168eaea95fe (diff) | |
Fixed #36795 -- Enforced quoting of all database object names.
This ensures all database identifiers are quoted independently of their orign
and most importantly that user provided aliases through annotate() and alias()
which paves the way for dropping the allow list of characters such aliases can
contain.
This will require adjustments to raw SQL interfaces such as RawSQL that might
make reference to ORM managed annotations as these will now be quoted.
The `SQLCompiler.quote_name_unless_alias` method is kept for now as an alias
for the newly introduced `.quote_name` method but will be duly deprecated in
a follow up commit.
Diffstat (limited to 'tests/foreign_object')
| -rw-r--r-- | tests/foreign_object/models/article.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/foreign_object/models/article.py b/tests/foreign_object/models/article.py index 276296c8d4..9d8a35da7c 100644 --- a/tests/foreign_object/models/article.py +++ b/tests/foreign_object/models/article.py @@ -22,7 +22,7 @@ class ColConstraint: self.alias, self.col, self.value = alias, col, value def as_sql(self, compiler, connection): - qn = compiler.quote_name_unless_alias + qn = compiler.quote_name return "%s.%s = %%s" % (qn(self.alias), qn(self.col)), [self.value] |
