django/tests/model_fields
Simon Charette e03e5c751c Fixed #33312 -- Raised explicit exception when copying deferred model instances.
Previously save() would crash with an attempted forced update message, and both
save(force_insert=True) and bulk_create() would crash with DoesNotExist errors
trying to retrieve rows with an empty primary key (id IS NULL).

Implementing deferred field model instance copying might be doable in certain
cases (e.g. when all the deferred fields are db generated) but that's not
trivial to implement in a backward compatible way.

Thanks Adam Sołtysik for the report and test and Clifford for the review.
2025-05-16 08:13:57 +02:00
..
4x8.png
8x4.png
__init__.py
models.py Refs #35167 -- Fixed test_bulk_update_custom_get_prep_value() crash on databases that don't support primitives in JSONFields. 2025-02-20 08:14:18 +01:00
storage.py Fixed #35139 -- Prevented file read after ImageField is saved to storage. 2024-05-22 00:25:56 +02:00
test_autofield.py
test_binaryfield.py Applied Black's 2025 stable style. 2025-03-01 19:41:37 +01:00
test_booleanfield.py
test_charfield.py Fixed #24561 -- Added support for callables on model fields' choices. 2023-09-14 10:15:33 -03:00
test_datetimefield.py
test_decimalfield.py Fixed #35982 -- Made DecimalField.get_db_prep_value() call DatabaseOperations.adapt_decimalfield_value(). 2024-12-09 09:46:06 +01:00
test_durationfield.py
test_field_flags.py
test_filefield.py Fixed #36005 -- Dropped support for Python 3.10 and 3.11. 2025-01-20 14:07:28 +01:00
test_filepathfield.py
test_floatfield.py
test_foreignkey.py
test_generatedfield.py Fixed #33312 -- Raised explicit exception when copying deferred model instances. 2025-05-16 08:13:57 +02:00
test_genericipaddressfield.py
test_imagefield.py Fixed #35139 -- Prevented file read after ImageField is saved to storage. 2024-05-22 00:25:56 +02:00
test_integerfield.py Fixed #24561 -- Added support for callables on model fields' choices. 2023-09-14 10:15:33 -03:00
test_jsonfield.py Fixed #36085 -- Added JSONField support for negative array indexing on SQLite. 2025-05-14 13:21:18 +02:00
test_manytomanyfield.py
test_mixins.py Refs #35405 -- Removed FieldCacheMixin.get_cache_name() per deprecation timeline. 2025-01-15 22:28:37 +01:00
test_promises.py
test_slugfield.py
test_textfield.py
test_uuid.py
tests.py Fixed #35766 -- Handled slices in BaseChoiceIterator. 2024-09-18 16:45:53 +02:00