Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Documented in_bulk behavior with nonexistent id_list items. #14402

Merged
merged 1 commit into from
Jul 7, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 4 additions & 1 deletion docs/ref/models/querysets.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2294,7 +2294,10 @@ database query like ``count()`` would.

Takes a list of field values (``id_list``) and the ``field_name`` for those
values, and returns a dictionary mapping each value to an instance of the
object with the given field value. If ``id_list`` isn't provided, all objects
object with the given field value. No
:exc:`django.core.exceptions.ObjectDoesNotExist` exceptions will ever be raised
by ``in_bulk``; that is, any ``id_list`` value not matching any instance will
simply be ignored. If ``id_list`` isn't provided, all objects
in the queryset are returned. ``field_name`` must be a unique field or a
distinct field (if there's only one field specified in :meth:`distinct`).
``field_name`` defaults to the primary key.
Expand Down