Browse Source

Bug 26271: Add null to the list of accepted account_line data types

The database schema for accountlines table allows the
manager_id/user_id column to be NULL. If request to
/api/v1/patrons/<patron_id>/account returns such an accountline where
it is NULL we get 500 error as response. Adding NULL to allowed data
types fixes this issue.

To test:
 1) Run prove t/db_dependent/api/v1/patrons_accounts.t and notice it
    doesn't fail

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
20.11.x
Joonas Kylmälä 4 years ago
committed by Jonathan Druart
parent
commit
089b857586
  1. 5
      api/v1/swagger/definitions/account_line.json

5
api/v1/swagger/definitions/account_line.json

@ -84,7 +84,10 @@
"description": "Internal note" "description": "Internal note"
}, },
"user_id": { "user_id": {
"type": "integer", "type": [
"integer",
"null"
],
"description": "Internal patron identifier for the staff member that introduced the account line" "description": "Internal patron identifier for the staff member that introduced the account line"
}, },
"library_id": { "library_id": {

Loading…
Cancel
Save