diff options
author | Étienne Loks <etienne.loks@iggdrasil.net> | 2019-02-19 20:27:30 +0100 |
---|---|---|
committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2019-04-24 19:38:56 +0200 |
commit | 1c52222d9a64161542970590376658818d00361f (patch) | |
tree | be15b4f9345ae5198ea9c48267bffeaf1af72081 /ishtar_common/widgets.py | |
parent | 670ce3fb9c575dbac398a4887f749504a1f73088 (diff) | |
download | Ishtar-1c52222d9a64161542970590376658818d00361f.tar.bz2 Ishtar-1c52222d9a64161542970590376658818d00361f.zip |
Refactor to prevent DB access before app ready
Diffstat (limited to 'ishtar_common/widgets.py')
-rw-r--r-- | ishtar_common/widgets.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ishtar_common/widgets.py b/ishtar_common/widgets.py index cc4f5c8e8..37f44e938 100644 --- a/ishtar_common/widgets.py +++ b/ishtar_common/widgets.py @@ -971,7 +971,7 @@ class DataTable(Select2Media, forms.RadioSelect): :param sortname: column name (model attribute) to use to sort :param col_prefix: prefix to remove to col_names :param gallery: display the gallery if True - :param map: display the map if True + :param map: display the map if True - can be a callable """ super(DataTable, self).__init__(attrs=attrs) self.source = source @@ -1113,7 +1113,7 @@ class DataTable(Select2Media, forms.RadioSelect): 'remove': unicode(_(u"Remove")), 'sname': name.replace('-', ''), 'gallery': self.gallery, - 'use_map': self.map, + 'use_map': self.map() if callable(self.map) else self.map, 'multiple': self.multiple, 'multiple_select': self.multiple_select, 'multi_cols': ",".join((u'"%d"' % col |