def closeCopyMoveToTopic(self, dialog, save, rows, move):
        error = None
        if save:
            with self.app.db.getSession() as session:
                key = dialog.getSelected()
                new_topic = session.getTopic(key)
                if not new_topic:
                    error = "Unable to find topic %s" % topic_name
                else:
                    for row in rows:
                        project = session.getProject(row.project_key)
                        if move and row.topic_key:
                            old_topic = session.getTopic(row.topic_key)
                            self.log.debug((project, old_topic) % "Remove %s from %s")
                            old_topic.removeProject(project)
                        self.log.debug("Add %s to %s" % (project, new_topic))
                        new_topic.addProject(project)
        self.app.backScreen()
        if error:
            self.app.error(error)
dataset/ETHPy150Open openstack/gertty/gertty/view/project_list.py/ProjectListView.closeCopyMoveToTopic/swapped operands of `%`