Bugzilla – Attachment 109585 Details for
Bug 26271
Call to /api/v1/patrons/{patron_id}/account returns 500 error if manager_id is NULL
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 26271: Add null to the list of accepted account_line data types
Bug-26271-Add-null-to-the-list-of-accepted-account.patch (text/plain), 1.33 KB, created by
Fridolin Somers
on 2020-09-03 08:23:02 UTC
(
hide
)
Description:
Bug 26271: Add null to the list of accepted account_line data types
Filename:
MIME Type:
Creator:
Fridolin Somers
Created:
2020-09-03 08:23:02 UTC
Size:
1.33 KB
patch
obsolete
>From a27bfa4816b9a3a166d7efdd8b21ad98d27b0d7c Mon Sep 17 00:00:00 2001 >From: =?UTF-8?q?Joonas=20Kylm=C3=A4l=C3=A4?= <joonas.kylmala@helsinki.fi> >Date: Fri, 21 Aug 2020 16:23:38 +0300 >Subject: [PATCH] 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> >--- > api/v1/swagger/definitions/account_line.json | 5 ++++- > 1 file changed, 4 insertions(+), 1 deletion(-) > >diff --git a/api/v1/swagger/definitions/account_line.json b/api/v1/swagger/definitions/account_line.json >index 5cdd169518..04c61551f8 100644 >--- a/api/v1/swagger/definitions/account_line.json >+++ b/api/v1/swagger/definitions/account_line.json >@@ -84,7 +84,10 @@ > "description": "Internal note" > }, > "user_id": { >- "type": "integer", >+ "type": [ >+ "integer", >+ "null" >+ ], > "description": "Internal patron identifier for the staff member that introduced the account line" > }, > "library_id": { >-- >2.27.0
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 26271
:
108820
|
108821
|
109583
|
109584
|
109585
|
109591
|
109592