]> git.koha-community.org Git - koha.git/commit
Bug 31381: Handle null attributes in list
authorNick Clemens <nick@bywatersolutions.com>
Tue, 22 Nov 2022 19:21:22 +0000 (19:21 +0000)
committerMartin Renvoize <martin.renvoize@ptfs-europe.com>
Fri, 2 Dec 2022 10:13:16 +0000 (10:13 +0000)
commit6517538189fcff6f1bae724d8f7e407554b95a3b
tree895f61221947e3783fb672f8030c793112b057ff
parentf7541837f68afd9d90c49d3ee5f72aa7f04ef094
Bug 31381: Handle null attributes in list

This patch allows null values to be returned in patron attributes
to prevent a crash when searching patrons

To test:
1 - Add a NULL attribute to a borrower, in sample data, Edna Acosta
    sudo koha-mysql kohadev
    INSERT INTO borrower_attributes (borrowernumber,code,attribute) VALUES (5,'SHOW_BCODE',NULL);
2 - Browse to 'Home->Patrons'
    http://localhost:8081/cgi-bin/koha/members/members-home.pl
3 - Click 'Browse by last name: A'
4 - Datatables error:
    Expected string - got null
5 - Apply patch
6 - Restart all
7 - Browse by last name: A
8 - Success!

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit f6905139472bacd31a86249e4b09cdb44eeed269)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
api/v1/swagger/definitions/patron_extended_attribute.yaml