Django

Code

Ticket #1565 (closed: fixed)

Opened 3 years ago

Last modified 2 years ago

[patch] [magic-removal] in_bulk() throws an exception on an empty list of ids

Reported by: akaihola Assigned to: adrian
Milestone: Component: Database layer (models, ORM)
Version: Keywords:
Cc: Triage Stage: Unreviewed
Has patch: 1 Needs documentation: 0
Needs tests: 0 Patch needs improvement: 0

Description

It would be more useful if in_bulk returned simply an empty dictionary if the given id list is empty.

Attachments

in_bulk-empty-list.diff (0.8 kB) - added by akaihola on 03/30/06 13:15:11.
patched in_bulk() returns {} if id_list is [] or ()
in_bulk-empty-list-test.diff (500 bytes) - added by akaihola on 03/30/06 13:37:31.
Test fixed for in_bulk([])

Change History

03/30/06 13:15:11 changed by akaihola

  • attachment in_bulk-empty-list.diff added.

patched in_bulk() returns {} if id_list is [] or ()

03/30/06 13:37:31 changed by akaihola

  • attachment in_bulk-empty-list-test.diff added.

Test fixed for in_bulk([])

04/10/06 22:15:24 changed by adrian

  • status changed from new to closed.
  • resolution set to fixed.

(In [2663]) magic-removal: Fixed #1565 -- in_bulk() now returns empty dictionary if passed an empty list of IDs


Add/Change #1565 ([patch] [magic-removal] in_bulk() throws an exception on an empty list of ids)




Change Properties
Action