Collections API users_of_interest can crash on users with null card values
Bug #1394989 reported by
Michael Peters
This bug affects 4 people
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Evergreen |
Fix Released
|
Medium
|
Unassigned | ||
2.7 |
Fix Released
|
Medium
|
Unassigned | ||
2.8 |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
Evergreen Master
OpenSRF Master
If the open-ils.
has a null "card" value in actor.usr the API will crash with an error like:
Received Exception:
Name: osrfMethodException
Status: *** Call to [open-ils.
Can't call method "barcode" on an undefined value at /usr/local/
This patches users_of_interest to be sure that the user has a defined value
for actor.usr.card before proceeding to pull out the barcode for the results
of the API call.
Changed in evergreen: | |
milestone: | 2.9-alpha → 2.9-beta |
Changed in evergreen: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
For potential testers -- an easy srfsh command to test is below. Set a user in your system to have a null actor.usr.card value and make sure they will end up in the results of this srfsh command.
request open-ils. collections open-ils. collections. users_of_ interest. retrieve, "your auth token from a login", "number of days back", "total fine amount", "shortname of home library"
Something like:
srfsh# login admin open-ils
Received Data: "071fa4b8850e68 0842df18d3e7f53 b43"
------- ------- ------- ------- ------- - ------- ------- ------- ------- -
Request Completed Successfully
Request Time in seconds: 0.013642
-------
Received Data: { :"SUCCESS" , :"oils_ auth.c: 531", :"192173272b39a c051961b5dd7944 201e",
"ilsevent":0,
"textcode"
"desc":"Success",
"pid":3111,
"stacktrace"
"payload":{
"authtoken"
"authtime":420
}
}
------- ------- ------- ------- ------- - ------- ------- ------- ------- - 51961b5dd794420 1e. Session timeout: 420.000000
Request Completed Successfully
Request Time in seconds: 0.301600
-------
Login Session: 192173272b39ac0
srfsh# request open-ils. collections open-ils. collections. users_of_ interest. retrieve, "192173272b39ac 051961b5dd79442 01e", "15", "4.99", "DCPL"