From 9ce77e80a9dc82c0abaa82ccb35f2331c2d3f965 Mon Sep 17 00:00:00 2001 From: Nick Clemens Date: Fri, 28 Apr 2017 14:11:00 -0400 Subject: [PATCH] Bug 18512 - GetAuthorisedValues.GetByCode Template plguin should return code (not empty string) if value not found To test: 1 - Create or edit a borrower with info in Sort1 and Sort2 field, not mapped to authorized values 2 - Note this info does not display on moremember.tt 3 - Apply patch 4 - Note value is passed through Signed-off-by: Mark Tompsett Signed-off-by: Jonathan Druart Signed-off-by: Kyle M Hall (cherry picked from commit 62c337065590a0eca51db37d286bcb04fa7971ff) Signed-off-by: Katrin Fischer --- Koha/Template/Plugin/AuthorisedValues.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Koha/Template/Plugin/AuthorisedValues.pm b/Koha/Template/Plugin/AuthorisedValues.pm index 39ec785131..161460a921 100644 --- a/Koha/Template/Plugin/AuthorisedValues.pm +++ b/Koha/Template/Plugin/AuthorisedValues.pm @@ -31,7 +31,7 @@ sub GetByCode { ? $opac ? $av->next->opac_description : $av->next->lib - : ''; + : $code; } sub Get { -- 2.39.2