Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#1565 closed enhancement (fixed)

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

Reported by: akaihola Owned by: adrian
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: UI/UX:

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 akaihola 9 years ago.
patched in_bulk() returns {} if id_list is [] or ()
in_bulk-empty-list-test.diff (500 bytes) - added by akaihola 9 years ago.
Test fixed for in_bulk([])

Download all attachments as: .zip

Change History (3)

Changed 9 years ago by akaihola

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

Changed 9 years ago by akaihola

Test fixed for in_bulk([])

comment:1 Changed 9 years ago by adrian

  • Resolution set to fixed
  • Status changed from new to closed

(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