diff options
| author | James Gillard <jamesgillard@live.co.uk> | 2022-12-10 15:46:23 +0000 |
|---|---|---|
| committer | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2022-12-10 19:39:00 +0100 |
| commit | af3cfc863095e70f752c6b1875ed5c5dbaac2c4a (patch) | |
| tree | e7729c75470578ef90fe236c944811056b7c3c24 /django/contrib/postgres/fields/array.py | |
| parent | 3137174344775fa2358e39cd90e6137f292f8daa (diff) | |
[4.1.x] Fixed #34205 -- Fixed Meta.constraints validation crash with ArrayField and __len lookup.
Regression in 88fc9e2826044110b7b22577a227f122fe9c1fb5 that began
manifesting in Django 4.1.
Backport of c5ed884eabf3b2b67581c55bf6c87e721f69157f from main.
Diffstat (limited to 'django/contrib/postgres/fields/array.py')
| -rw-r--r-- | django/contrib/postgres/fields/array.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/django/contrib/postgres/fields/array.py b/django/contrib/postgres/fields/array.py index 7269198674..97c6515d95 100644 --- a/django/contrib/postgres/fields/array.py +++ b/django/contrib/postgres/fields/array.py @@ -265,7 +265,7 @@ class ArrayLenTransform(Transform): return ( "CASE WHEN %(lhs)s IS NULL THEN NULL ELSE " "coalesce(array_length(%(lhs)s, 1), 0) END" - ) % {"lhs": lhs}, params + ) % {"lhs": lhs}, params * 2 @ArrayField.register_lookup |
