Merge branch '0.6_dev_jc' of github.com:OpenSPG/openspg into 0.6_dev_jc

This commit is contained in:
锦呈 2024-12-19 14:10:54 +08:00
commit 3da7b17124
2 changed files with 2 additions and 6 deletions

View File

@ -41,11 +41,7 @@ class Client(ABC):
project_id (int): The ID of the user's project. If not provided, the value from the environment variable `KAG_PROJECT_ID` is used.
"""
self._host_addr = host_addr or env.host_addr
# self._project_id = project_id or env.id
@property
def _project_id(self):
return env.id
self._project_id = project_id or env.id
@staticmethod
def serialize(obj):

View File

@ -29,7 +29,7 @@ class ReasonerClient(Client):
"""SPG Reasoner Client."""
def __init__(self, host_addr: str = None, project_id: int = None, namespace=None):
super().__init__(host_addr, project_id)
super().__init__(host_addr, str(project_id))
self._rest_client: rest.ReasonerApi = rest.ReasonerApi(
api_client=ApiClient(configuration=Configuration(host=host_addr))
)