Files
django/tests
Nilesh Kumar Pahari fe189dc43a Fixed #36847 -- Ensured auto_now_add fields are set on pre_save().
Regression in 94680437a4. Refs #27222.

During INSERT operations, `field.pre_save()` is called to prepare values
for db insertion. The `add` param must be `True` for `auto_now_add`
fields to be populated. The regression commit passed `False`, causing
`auto_now_add` fields to remain `None` when used by other fields, such
as `upload_to` callables.

Thanks Ran Benita for the report.
2026-01-29 10:11:33 -03:00
..
2026-01-18 21:26:56 +01:00
2026-01-18 21:26:56 +01:00
2026-01-18 21:26:56 +01:00
2024-01-26 12:45:07 +01:00

To run the test suite, first, create and activate a virtual environment. Then
install some requirements and run the tests::

    $ cd tests
    $ python -m pip install -e ..
    $ python -m pip install -r requirements/py3.txt
    $ ./runtests.py

For more information about the test suite, see
https://docs.djangoproject.com/en/dev/internals/contributing/writing-code/unit-tests/.