From 2688bd83ab367e20b38c785acf18b81babf14afc Mon Sep 17 00:00:00 2001 From: vsian Date: Thu, 31 Oct 2024 14:51:07 +0800 Subject: [PATCH] fix --- python/infinity_http.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/python/infinity_http.py b/python/infinity_http.py index 44a2b7cdf2..29ebc4d6d2 100644 --- a/python/infinity_http.py +++ b/python/infinity_http.py @@ -376,7 +376,7 @@ def create_index( h = self.net.set_up_header( ["accept", "content-type"], ) - d = self.set_up_data( + d = self.net.set_up_data( ["create_option"], {"comment" : index_comment, "fields": fields, "index": create_index_info, "create_option": copt} ) r = self.net.request(url, "post", h, d) @@ -404,9 +404,9 @@ def drop_index( def show_index(self, index_name): url = f"databases/{self.database_name}/tables/{self.table_name}/indexes/{index_name}" - h = self.set_up_header(["accept"]) - r = self.request(url, "get", h) - self.raise_exception(r) + h = self.net.set_up_header(["accept"]) + r = self.net.request(url, "get", h) + self.net.raise_exception(r) r_json = r.json() index_comment = r_json.get("index_comment", "") return database_result(index_comment=index_comment)