diff options
| author | Chris Wesseling <chris@maykinmedia.nl> | 2025-11-20 15:01:14 +0100 |
|---|---|---|
| committer | Jacob Walls <jacobtylerwalls@gmail.com> | 2025-11-20 17:24:10 -0500 |
| commit | ac9bdcabe10fb7ac0c7e9ebcd879f5e34bee776f (patch) | |
| tree | 517bd72a81b32a1e0664a0b9a22cdd2c56a67356 /tests/postgres_tests/fields.py | |
| parent | 001c2f546b4053acb04f16d6b704f7b4fbca1c45 (diff) | |
[5.2.x] Fixed #36748 -- Filtered non-standard placeholders from UNNEST queries.
Backport of 5834643f43a767fe19f2c6d10217b204e7584ec8 from main.
Diffstat (limited to 'tests/postgres_tests/fields.py')
| -rw-r--r-- | tests/postgres_tests/fields.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/postgres_tests/fields.py b/tests/postgres_tests/fields.py index c5dddf197f..d099effdd5 100644 --- a/tests/postgres_tests/fields.py +++ b/tests/postgres_tests/fields.py @@ -57,3 +57,8 @@ except ImportError: class EnumField(models.CharField): def get_prep_value(self, value): return value.value if isinstance(value, enum.Enum) else value + + +class OffByOneField(models.IntegerField): + def get_placeholder(self, value, compiler, connection): + return "(%s + 1)" |
