open-ils.actor.container.item.create does not work with more than 1 item
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Evergreen |
New
|
Undecided
|
Unassigned |
Bug Description
Evergreen: 2.9, 2.10, and master
OpenSRF Version: N/A
Pg Version: N/A
The documentation and most of the code for open-ils.
However, the permission checking code assumes that only 1 item is present. Thus, passing an array of items leads to a Perl error:
Can't call method "bucket" on unblessed reference at /usr/local/
I used code like that in the attachment to trigger it. You would need to modify it for it to "work" in your environment.
I can think of a couple of ways to fix it.
1) Is to loop over all of the bucket items, checking the permission for each bucket, and returning as soon as there is a failure. This makes no assumptions about the items being in the same bucket.
2) Is to simply check the permissions on the bucket of the first item. This assumes that all the items are being added to the same bucket.
I'm inclined to go with #1, but I'll leave that open for discussion.
tags: | added: buckets-item |