def delete_person(self, person_id): with self._database_engine.new_session() as session: person_dao = PersonDAO(session) person = person_dao.get(person_id) person_dao.delete(person)
def delete_person(self, member_id, person_type=None): logging.info("Delete person %s" % member_id) with self._database_engine.new_session() as session: dao = PersonDAO(session) member = dao.get(member_id) dao.delete(member)
def delete_person(self, member_id, person_type=None): with self._database_engine.new_session() as session: dao = PersonDAO(session).get_dao(type=person_type) member = dao.get(member_id) dao.delete(member)