{{{#!python
CharArrayModel.objects.filter(field=['text'])
}}}
I get:
{{{
ProgrammingError: operator does not exist: character varying[] = text[]
LINE 1: ...el" WHERE "postgres_tests_chararraymodel"."field" = ARRAY['...
^
HINT: No operator matches the given name and argument type(s). You might
need to add explicit type casts.
}}}
The same happens if I use `__exact`.
--
Ticket URL: <https://code.djangoproject.com/ticket/25666>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* needs_better_patch: => 0
* needs_tests: => 0
* needs_docs: => 0
Comment:
I stumbled upon this because I was trying to edit a `unique=True`
ArrayField via the admin. Before saving, the admin does a check along the
lines of
{{{CharArrayModel.objects.filter(field=['my_new_text']).exclude(pk=self.pk)}}}.
--
Ticket URL: <https://code.djangoproject.com/ticket/25666#comment:1>
* has_patch: 0 => 1
Comment:
PR: https://github.com/django/django/pull/5575
--
Ticket URL: <https://code.djangoproject.com/ticket/25666#comment:2>
Comment (by charettes):
#25091 was a duplicate.
--
Ticket URL: <https://code.djangoproject.com/ticket/25666#comment:3>
* stage: Unreviewed => Accepted
--
Ticket URL: <https://code.djangoproject.com/ticket/25666#comment:4>
* owner: => Stranger6667
* status: new => assigned
--
Ticket URL: <https://code.djangoproject.com/ticket/25666#comment:5>
* stage: Accepted => Ready for checkin
--
Ticket URL: <https://code.djangoproject.com/ticket/25666#comment:6>
* status: assigned => closed
* resolution: => fixed
Comment:
In [changeset:"263b3d2ba132ea443193dc0b728741317742c8d3" 263b3d2b]:
{{{
#!CommitTicketReference repository=""
revision="263b3d2ba132ea443193dc0b728741317742c8d3"
Fixed #25666 -- Fixed the exact lookup of ArrayField.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/25666#comment:7>
Comment (by Tim Graham <timograham@…>):
In [changeset:"e9c9f2ed82bd59b211f5f449730ad1299cfdd3c1" e9c9f2ed]:
{{{
#!CommitTicketReference repository=""
revision="e9c9f2ed82bd59b211f5f449730ad1299cfdd3c1"
[1.8.x] Fixed #25666 -- Fixed the exact lookup of ArrayField.
Backport of 263b3d2ba132ea443193dc0b728741317742c8d3 from master
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/25666#comment:8>
Comment (by Tim Graham <timograham@…>):
In [changeset:"fe79bc3ed97bbc719dba3e91eebfee3016b5e55a" fe79bc3e]:
{{{
#!CommitTicketReference repository=""
revision="fe79bc3ed97bbc719dba3e91eebfee3016b5e55a"
[1.9.x] Fixed #25666 -- Fixed the exact lookup of ArrayField.
Backport of 263b3d2ba132ea443193dc0b728741317742c8d3 from master
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/25666#comment:9>