Opened 19 years ago

Closed 19 years ago

Last modified 18 years ago

#1565 closed enhancement (fixed)

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

Reported by: Antti Kaihola Owned by: Adrian Holovaty
Component: Database layer (models, ORM) Version:
Severity: minor Keywords:
Cc: Triage Stage: Unreviewed
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

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

Attachments (2)

in_bulk-empty-list.diff (776 bytes ) - added by Antti Kaihola 19 years ago.
patched in_bulk() returns {} if id_list is [] or ()
in_bulk-empty-list-test.diff (500 bytes ) - added by Antti Kaihola 19 years ago.
Test fixed for in_bulk([])

Download all attachments as: .zip

Change History (3)

by Antti Kaihola, 19 years ago

Attachment: in_bulk-empty-list.diff added

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

by Antti Kaihola, 19 years ago

Test fixed for in_bulk([])

comment:1 by Adrian Holovaty, 19 years ago

Resolution: fixed
Status: newclosed

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

Note: See TracTickets for help on using tickets.
Back to Top