Opened 19 years ago

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

Description

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 19 years ago.

Download all attachments as: .zip

Change History (2)

by Antti Kaihola, 19 years ago

Attachment: get_in_bulk_empty_list.diff added

comment:1 by Adrian Holovaty, 19 years ago

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