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:22:46 -0500 |
| commit | 5834643f43a767fe19f2c6d10217b204e7584ec8 (patch) | |
| tree | adbc0a865f9338296e984ba7a92ba868c4039458 /tests/postgres_tests/fields.py | |
| parent | ff843bcbce1f7fc16fcc4d4810c221a2eb11c167 (diff) | |
Fixed #36748 -- Filtered non-standard placeholders from UNNEST queries.
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)" |
