From 2590fb7a15f4c1d99da9340c0eda3365d1ef84ef Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Wed, 12 Jun 2019 19:46:52 +0200 Subject: Fix custom table for find treatments --- ishtar_common/widgets.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'ishtar_common/widgets.py') diff --git a/ishtar_common/widgets.py b/ishtar_common/widgets.py index 5b5f44477..b13e9fe2e 100644 --- a/ishtar_common/widgets.py +++ b/ishtar_common/widgets.py @@ -948,8 +948,8 @@ class JQueryPersonOrganization(forms.TextInput): class DataTable(Select2Media, forms.RadioSelect): - def __init__(self, source, form, associated_model, attrs={}, - table_cols='TABLE_COLS', multiple=False, multiple_cols=[2], + def __init__(self, source, form, associated_model, attrs=None, + table_cols='TABLE_COLS', multiple=False, multiple_cols=None, new=False, new_message="", source_full=None, multiple_select=False, sortname="__default__", col_prefix='', gallery=False, map=False): @@ -982,6 +982,8 @@ class DataTable(Select2Media, forms.RadioSelect): self.table_cols = table_cols self.multiple = multiple self.multiple_select = multiple_select + if not multiple_cols: + multiple_cols = [2] self.multiple_cols = multiple_cols self.new, self.new_message = new, new_message self.source_full = source_full -- cgit v1.2.3