1
0
mirror of https://github.com/django/django.git synced 2025-03-10 01:12:53 +00:00
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 f9936deed1ff13b20e18bd9ca2b0750b52706b6c.

Backport of 517d3bb4dd17e9c51690c98d747b86a0ed8b2fbf from main
2023-08-19 11:23:59 +02:00
..
2019-11-26 14:02:24 +01:00
2013-10-10 16:49:20 -04:00
2023-04-17 07:44:29 +02:00
2012-08-31 20:35:50 +02:00
2023-04-17 07:44:29 +02:00
2014-12-19 18:07:52 +01:00
2023-04-17 07:44:29 +02:00
2023-04-17 07:44:29 +02:00
2015-10-03 19:31:45 -04:00
2023-04-17 07:44:29 +02:00
2023-04-17 07:44:29 +02:00
2017-07-01 19:13:35 -04:00
2017-10-05 14:13:32 -04:00
2023-04-17 07:44:29 +02:00
2022-02-02 07:17:57 +01:00
2023-04-17 07:44:29 +02:00
2020-01-02 07:55:53 +01:00
2020-02-03 08:52:16 +01:00
2023-04-17 07:44:29 +02:00
2020-10-01 07:22:28 +02:00
2020-12-01 06:24:16 +01:00
2021-01-04 08:31:51 +01:00
2021-09-01 07:40:01 +02:00
2021-10-05 09:07:26 +02:00
2021-11-01 10:18:49 +01:00
2022-02-02 07:17:57 +01:00
2023-04-17 07:44:29 +02:00
2022-02-02 07:17:57 +01:00
2023-04-17 07:44:29 +02:00
2022-09-05 05:21:23 +02:00
2022-11-01 06:54:19 +01:00
2022-12-06 09:56:43 +01:00
2023-01-02 08:10:59 +01:00