django/tests/serializers
Juan Alvarez 46b2b08e45 [4.2.x] Fixed #34779 -- Avoided unnecessary selection of non-nullable m2m fields without natural keys during serialization.
By using `select_related(None)` instead of `select_related()`, the
unnecessary joins are completely avoided. Note that the current tests
already covers the change, when the field is not `null=True`.

Regression in f9936deed1.

Backport of 517d3bb4dd from main
2023-08-19 11:23:59 +02:00
..
models [4.2.x] Fixed #34779 -- Avoided unnecessary selection of non-nullable m2m fields without natural keys during serialization. 2023-08-19 11:23:59 +02:00
__init__.py
test_data.py [4.2.x] Refs #33476 -- Applied Black's 2023 stable style. 2023-02-01 11:37:29 +01:00
test_deserializedobject.py Refs #33476 -- Reformatted code with Black. 2022-02-07 20:37:05 +01:00
test_json.py [4.2.x] Fixed #34620 -- Fixed serialization crash on m2m fields without natural keys when base querysets use select_related(). 2023-06-04 20:49:40 +02:00
test_jsonl.py [4.2.x] Fixed #34620 -- Fixed serialization crash on m2m fields without natural keys when base querysets use select_related(). 2023-06-04 20:49:40 +02:00
test_natural.py Fixed various tests on MySQL with MyISAM storage engine. 2022-04-18 07:05:52 +02:00
test_xml.py [4.2.x] Fixed #34620 -- Fixed serialization crash on m2m fields without natural keys when base querysets use select_related(). 2023-06-04 20:49:40 +02:00
test_yaml.py [4.2.x] Fixed #34620 -- Fixed serialization crash on m2m fields without natural keys when base querysets use select_related(). 2023-06-04 20:49:40 +02:00
tests.py [4.2.x] Fixed #34620 -- Fixed serialization crash on m2m fields without natural keys when base querysets use select_related(). 2023-06-04 20:49:40 +02:00