From a27bfa4816b9a3a166d7efdd8b21ad98d27b0d7c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joonas=20Kylm=C3=A4l=C3=A4?= 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//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 --- 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