diff options
| author | David Wobrock <david.wobrock@gmail.com> | 2023-04-18 10:19:06 +0200 |
|---|---|---|
| committer | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2023-04-18 12:41:14 +0200 |
| commit | 9bbf97bcdb488bb11aebb5bd405549fbec6852cd (patch) | |
| tree | d679e1a72227b9b6b5b5f44af6a4e231228f2d0d /django/db/backends/base/operations.py | |
| parent | 594fcc2b7427f7baf2cf1a2d7cd2be61467df0c3 (diff) | |
Fixed #16055 -- Fixed crash when filtering against char/text GenericRelation relation on PostgreSQL.
Diffstat (limited to 'django/db/backends/base/operations.py')
| -rw-r--r-- | django/db/backends/base/operations.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/django/db/backends/base/operations.py b/django/db/backends/base/operations.py index d2bc336dd8..6f10e31cd5 100644 --- a/django/db/backends/base/operations.py +++ b/django/db/backends/base/operations.py @@ -8,6 +8,7 @@ import sqlparse from django.conf import settings from django.db import NotSupportedError, transaction from django.db.backends import utils +from django.db.models.expressions import Col from django.utils import timezone from django.utils.encoding import force_str @@ -776,3 +777,9 @@ class BaseDatabaseOperations: def on_conflict_suffix_sql(self, fields, on_conflict, update_fields, unique_fields): return "" + + def prepare_join_on_clause(self, lhs_table, lhs_field, rhs_table, rhs_field): + lhs_expr = Col(lhs_table, lhs_field) + rhs_expr = Col(rhs_table, rhs_field) + + return lhs_expr, rhs_expr |
