From 733612100fcc0c2658a69c317977129b7bfdf28f Mon Sep 17 00:00:00 2001 From: Tomas Cohen Arazi Date: Fri, 11 Sep 2020 09:16:57 -0300 Subject: [PATCH] Bug 20212: Remove warning if no basket group If any row contains no basket group, the browser console will show a datatables warning about basket.basket_group.name not existing. This patch gets rid of it. --- koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcel.tt | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcel.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcel.tt index b7586783a9..3c56eef35a 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcel.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcel.tt @@ -426,7 +426,14 @@ { "data": "basket.basket_group.name", "orderable": true, "render": function(data, type, row, meta) { - if ( type != 'display' ) return data; + if ( type != 'display' ) { + if ( data == null ) { + return ""; + } + else { + return data; + } + } if ( row.basket.basket_group_id == null ) { return _("No basket group"); } -- 2.28.0