def _select(self):
        self_id, rel_id = self._get_rel_names()
        c = self.db.execute(
            'select %s from %s where %s = %s;' % (
                rel_id, self.rel, self_id, self.id)
        )
        rs = c.fetchall()
        if len(rs) == 0:
            return self.db.__tabledict__[self.to_table].select().where('id=-1')
        return self.db.__tabledict__[self.to_table].select().where(
            ' or '.join([c[0] % 'id = "%s"' for c in rs])
        )
dataset/ETHPy150Open jasonlvhit/lunar/lunar/database.py/ManyToManyField._select/swapped operands of `%`