Re: Model-level validation

2022-10-10 Thread Shai Berger
I see two separate concerns here: 1) Should Django present to users the option to do validate-on-save by default? That is, should that option be visible -- in the form of a documented setting or an optional argument to save()? I tend to accept James' (and others) views and reasoning against

Re: ArrayField: Bug on exact_nested_null

2022-10-10 Thread Ion Alberdi
>Imho the important bit > is, that ARRAY will drop the top level array to {} (empty array with no > dimension info), if there is at least one empty sub array declared with > ARRAY among NULLs, while if all sub entries are NULL the top level array > will still manifest with dimension info, but now

Re: ArrayField: Bug on exact_nested_null

2022-10-10 Thread Jörg Breitbart
Not sure if it is related, but the last sentence here caught my attention: > I wonder whether this is due to django or psycopg2. Indeed, the bug is > not reproduced > if at least one of the element in the nested array is not null. When doing a COPY FROM replacement of bulk_update for postgres

Re: ArrayField: Bug on exact_nested_null

2022-10-10 Thread Ion Alberdi
No pb & crystal clear, ticket created at https://code.djangoproject.com/ticket/34080#ticket thanks again Adam! Le lundi 10 octobre 2022 à 10:02:32 UTC+2, Adam Johnson a écrit : > Ah sorry didn't realize. > > I would just link to the test from your ticket for now, the fellows are > probably in a

Re: ArrayField: Bug on exact_nested_null

2022-10-10 Thread 'Adam Johnson' via Django developers (Contributions to Django itself)
Ah sorry didn't realize. I would just link to the test from your ticket for now, the fellows are probably in a better position to determine how to treat this bug. On Mon, Oct 10, 2022 at 8:47 AM Ion Alberdi wrote: > Great, thanks Adam! FYI the test is already on django's Test suite >

Re: ArrayField: Bug on exact_nested_null

2022-10-10 Thread Ion Alberdi
Great, thanks Adam! FYI the test is already on django's Test suite (https://github.com/pricemoov/django/pull/2/files) Would you like me to open a PR in Django or should I wait for the fix of the test being developed first? Le lun. 10 oct. 2022 à 09:39, 'Adam Johnson' via Django developers

Re: ArrayField: Bug on exact_nested_null

2022-10-10 Thread 'Adam Johnson' via Django developers (Contributions to Django itself)
Yes please create a ticket. If you’re feeling brave, try to adapt your test into Django’s test suite (here: https://github.com/django/django/blob/84206607d6bfd61e7f7a88b51163ffd4153e3b5a/tests/postgres_tests/test_array.py#L212 )! On Sun, Oct 9, 2022 at 11:49 AM Ion Alberdi wrote: > Hello to