summaryrefslogtreecommitdiff
path: root/tests/admin_scripts/tests.py
diff options
context:
space:
mode:
authorJim Bailey <jim@potatolondon.com>2013-11-01 12:55:35 +0000
committerAnssi Kääriäinen <akaariai@gmail.com>2013-11-03 12:27:54 +0200
commit539e3693d4712b249a95cfad8cfdeecdad1777a6 (patch)
tree6ef9c53c0f433430cfd1b60135cdcf31bb4fc684 /tests/admin_scripts/tests.py
parent4202d9cf0c359b5bb41247905454572b7f9644d9 (diff)
Fixed #20849 -- ModelForms do not work well with prefetch_related.
model_to_dict() (used when rendering forms) queries the database to get the list of primary keys for ManyToMany fields. This is unnecessary if the field queryset has been prefetched, all the keys are already in memory and can be obtained with a simple iteration.
Diffstat (limited to 'tests/admin_scripts/tests.py')
0 files changed, 0 insertions, 0 deletions