diff --git a/dynamicforms/mixins/related_field_ajax.py b/dynamicforms/mixins/related_field_ajax.py index e12c96bb..c1cdf8a0 100644 --- a/dynamicforms/mixins/related_field_ajax.py +++ b/dynamicforms/mixins/related_field_ajax.py @@ -115,6 +115,8 @@ def render_to_table(self, value, row_data): cr = self.child_relation if isinstance(value, BaseManager): value = value.all() + if value is None: + return "" return ", ".join((cr.display_value(item) for item in value)) # return ', '.join((cr.display_value(item) for item in cr.get_queryset().filter(pk__in=value))) elif isinstance(self, RelatedField):