From 79a6d9e8acd626c1d162155d7a7219162870eda2 Mon Sep 17 00:00:00 2001 From: Eric Lipe Date: Wed, 21 Aug 2024 10:16:29 -0400 Subject: [PATCH] - remove trailing comma --- admin_interface/static/admin_interface/508/dropdown-filter.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/admin_interface/static/admin_interface/508/dropdown-filter.js b/admin_interface/static/admin_interface/508/dropdown-filter.js index 0115ef2..cac1591 100644 --- a/admin_interface/static/admin_interface/508/dropdown-filter.js +++ b/admin_interface/static/admin_interface/508/dropdown-filter.js @@ -40,7 +40,7 @@ if (typeof (django) !== 'undefined' && typeof (django.jQuery) !== 'undefined') { selected = selected.concat(option.value, '%2C') } } - selected = selected.replace(/,+$/, "") + selected = selected.substring(0, selected.lastIndexOf('%2C')) if (selected !== '') { query = query.concat(conjunction, filter.options[0].getAttribute('key'), '=', selected) }