We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 7f5e323 + 262a0b3 commit 82aa73fCopy full SHA for 82aa73f
ajax_datatable/columns.py
@@ -221,13 +221,15 @@ def get_foreign_value(self, obj):
221
# _list should be generated in optimize_queryset, if not we use regular .all() to get the m2m
222
if not hasattr(obj, f'{m2m_name}_list'):
223
to_eval = f'obj.{m2m_name}.all()'
224
- list_values = [
+ return [
225
getattr(x, m2m_field)
226
for x in eval(to_eval)]
227
- current_value = ', '.join(list_values)
228
229
- return current_value
+ def render_column_value(self, obj, value_list):
+ if self._allow_choices_lookup:
230
+ return ', '.join([str(self._choices_lookup.get(value, '')) for value in value_list])
231
232
+ return ', '.join([str(value) for value in value_list])
233
234
class ColumnLink(object):
235
0 commit comments