Opened 12 years ago

Closed 12 years ago

#1181 closed defect (fixed)

[patch] get_in_bulk crashes on empty list

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: UI/UX:


The get_in_bulk operation crashes already before the empty list assertion, if [] (an empty list) is given as a positional argument and there is no id_list keyword argument.

The attached patch fixes this by assuming a default value of [] (an empty list) for the id_list keyword argument.

Attachments (1)

get_in_bulk_empty_list.diff (854 bytes) - added by Antti Kaihola 12 years ago.

Download all attachments as: .zip

Change History (2)

Changed 12 years ago by Antti Kaihola

Attachment: get_in_bulk_empty_list.diff added

comment:1 Changed 12 years ago by Adrian Holovaty

Resolution: fixed
Status: newclosed

(In [1834]) Fixed #1181 -- get_in_bulk no longer fails on empty input. Also added unit tests. Thanks, akaihola

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