{{{#!python
platforms = ArrayField(
models.CharField(max_length=10, choices=PLATFORMS_CHOICES),
verbose_name=_("Supported platforms")
)
}}}
You can see the traceback [https://gist.github.com/1a96a6e4f42aec599201
here]
I also created validator for the platforms field, but it seems that the
error happens before calling my validator
--
Ticket URL: <https://code.djangoproject.com/ticket/25841>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* status: new => assigned
* needs_better_patch: => 0
* needs_tests: => 0
* owner: => charettes
* needs_docs: => 0
* stage: Unreviewed => Accepted
Comment:
Confirmed with the latest Django 1.8 and master.
It looks like while `django.contrib.postgres.forms.array.SimpleArrayField`
[https://github.com/django/django/blob/273ce8aa6ae8a7404f5a9cd08f5e2753f1aa9368/django/contrib/postgres/forms/array.py#L49
concatenates it's underlying field's error message it doesn't pass the
original exception's parameters].
--
Ticket URL: <https://code.djangoproject.com/ticket/25841#comment:1>
* needs_better_patch: 0 => 1
* has_patch: 0 => 1
* needs_tests: 0 => 1
Comment:
Here's a [https://github.com/django/django/pull/5753 proposed patch] which
is missing tests.
Could you confirm it fixes your issue?
--
Ticket URL: <https://code.djangoproject.com/ticket/25841#comment:2>
* needs_better_patch: 1 => 0
* needs_tests: 1 => 0
Comment:
I'm pretty confident the patch does solve the reported issue.
--
Ticket URL: <https://code.djangoproject.com/ticket/25841#comment:3>
--
Ticket URL: <https://code.djangoproject.com/ticket/25841#comment:4>
* stage: Accepted => Ready for checkin
--
Ticket URL: <https://code.djangoproject.com/ticket/25841#comment:5>
* status: assigned => closed
* resolution: => fixed
Comment:
In [changeset:"3738e4ac46688a0f13139c0b9058fc81c1aac424" 3738e4a]:
{{{
#!CommitTicketReference repository=""
revision="3738e4ac46688a0f13139c0b9058fc81c1aac424"
Fixed #25841 -- Handled base array fields validation errors with params.
Thanks to Trac alias benzid-wael for the report.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/25841#comment:6>