mirror of
https://github.com/django/django.git
synced 2025-10-31 09:41:08 +00:00
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.
This commit is contained in:
committed by
Mariusz Felisiak
parent
6b965c6000
commit
517d3bb4dd
@@ -16,3 +16,7 @@ Bugfixes
|
||||
* Fixed a bug in Django 4.2 where the deprecated ``DEFAULT_FILE_STORAGE`` and
|
||||
``STATICFILES_STORAGE`` settings were not synced with ``STORAGES``
|
||||
(:ticket:`34773`).
|
||||
|
||||
* Fixed a regression in Django 4.2.2 that caused an unnecessary selection of a
|
||||
non-nullable ``ManyToManyField`` without a natural key during serialization
|
||||
(:ticket:`34779`).
|
||||
|
||||
Reference in New Issue
Block a user