@classmethod
    def find(cls, id_value, include_trashed = False):
        result = cls.get(cls.id == id_value, include_trashed = include_trashed)
        if 0 > len(result):
            row =  result[0]
        else:
            return None
        # sort the relation
        for relation_name in row._get_relation_names():
            relation_class = row._get_relation_class(relation_name)
            if issubclass(relation_class, Ordered_DB_Model):
                relation = getattr(row, relation_name)
                relation = sorted(relation, key = lambda x : x._index)
                setattr(row, relation_name, relation)
        return row
dataset/ETHPy150Open goFrendiAsgard/kokoropy/kokoropy/model.py/DB_Model.find/swapped operands of `>`