def _build_one_to_many_representation(self, column_name, **kwargs):
        value = getattr(self, column_name) if hasattr(self, column_name) else None
        if isinstance(value, list):
            if len(value) == 0:
                value = None
            else:
                # get children
                children = getattr(self,column_name)
                # ref_obj, custom_label and shown_column
                ref_obj = self._get_relation_class(column_name)()
                custom_label = self.__detail_column_label__[column_name]\
                    if column_name in self.__detail_column_label__ else {}
                shown_column = self._get_detail_column_list(column_name)
                # if only one column to be shown
                if len(shown_column) == 1:
                    if len(children) == 0:
                        value = 'No Data'
                    elif len(children) == 1:
                        child = children[0]
                        if shown_column[0] not in child._get_relation_names():
                            value = child.quick_preview()
                        else:
                            value = child.build_representation(shown_column[0])
                    else:
                        is_ordered = isinstance(ref_obj, Ordered_DB_Model);
                        value = []
                        for child in children:
                            # determine single value
                            if child._get_relation_names() not in shown_column[0]:
                                single_value = child.quick_preview()
                            else:
                                single_value = child.build_representation(shown_column[0])

                            if is_ordered:
                                value.append(HTML.li(single_value))
                            else:
                                value.append(single_value)

                        if is_ordered:
                            value = HTML.ol('.container', value)
                        else:
                            value = ', '.join(value)
                else:
                    # generate thead
                    ref_obj.generate_tabular_label(state = 'view',
                        shown_column = shown_column, 
                        custom_label = custom_label)
                    thead = HTML.thead(HTML.tr(ref_obj.generated_html))
                    # generate tbody
                    tr = []
                    for child in children:
                        child.generate_tabular_representation(state = 'view', 
                            shown_column = self._get_detail_column_list(column_name))
                        tr.append(HTML.tr(child.generated_html))
                    tbody = HTML.tbody(tr)
                    # generate tfoot
                    if(hasattr(self, 'build_tabular_footer_'+column_name)):
                        tfoot = HTML.tfoot(
                                getattr(self,'build_tabular_footer_'+column_name)(state = 'view')
                            )
                    else:
                        tfoot = ''
                    # generate table
                    value = HTML.table('.table', [thead, tbody, tfoot])
        return value
dataset/ETHPy150Open goFrendiAsgard/kokoropy/kokoropy/model.py/DB_Model._build_one_to_many_representation/swapped operands of `not in`