def cleanup_qualification(self, qualification_name: str) -> None: """Remove the qualification from the sandbox server, if it exists""" mapping = self.datastore.get_qualification_mapping(qualification_name) if mapping is None: return None requester_id = mapping["requester_id"] requester = Requester(self.db, requester_id) assert isinstance(requester, MTurkRequester), "Must be an mturk requester" client = requester._get_client(requester._requester_name) delete_qualification(client, mapping["mturk_qualification_id"])
def cleanup_qualification(): try: delete_qualification(client, qual_mapping["mturk_qualification_id"]) except: pass