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)
Change History (2)
by , 19 years ago
Attachment: | get_in_bulk_empty_list.diff added |
---|
comment:1 by , 19 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Note:
See TracTickets
for help on using tickets.
(In [1834]) Fixed #1181 -- get_in_bulk no longer fails on empty input. Also added unit tests. Thanks, akaihola