def delete_by_uuid(cls, del_uuid): execution = Execution.query.filter_by(uuid=del_uuid) if execution: from models.result import Result linked_results = Result.query.filter_by(execution_uuid=del_uuid) for result in linked_results: Result.delete_by_uuid(result.uuid) execution.delete() # rmtree(self.fq_storage_path) db_session.commit()
def delete_result_by_uuid(result_uuid): # noqa: E501 """Delete a result Deletes the result with the given UUID on it # noqa: E501 :param result_uuid: UUID of the result to delete :type result_uuid: str :rtype: Result """ result = ResultImpl.delete_by_uuid(result_uuid) return result_schema.dump(result)