From a14184398b6f199d8048f062d36e39e8ae677184 Mon Sep 17 00:00:00 2001 From: luolu Date: Thu, 14 Jul 2022 14:45:59 +0000 Subject: [PATCH] =?UTF-8?q?fix:=20=F0=9F=90=9B=20rent=20extension=20agent?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/v1/views/arkstore.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/api/v1/views/arkstore.py b/api/v1/views/arkstore.py index 0dd87b5b7..16cae38a3 100644 --- a/api/v1/views/arkstore.py +++ b/api/v1/views/arkstore.py @@ -28,6 +28,7 @@ # unbind_arkstore_agent, get_arkstore_extension_markdown, ) +from arkid.common.bind_saas import get_bind_info from arkid.core.api import api, operation from datetime import datetime from typing import List, Optional @@ -347,7 +348,12 @@ def create_rent_order_arkstore_extension(request, tenant_id: str, package: str, ext_info = get_arkstore_extension_detail_by_package(access_token, package) if ext_info is None: return {} - resp = lease_arkstore_extension(access_token, ext_info['uuid'], data.dict()) + platform_tenant = Tenant.platform_tenant() + resp = get_bind_info(platform_tenant.id.hex) + agent_uuid = resp.get('saas_tenant_id') + rent_data = data.dict() + rent_data['agent_uuid'] = agent_uuid + resp = lease_arkstore_extension(access_token, ext_info['uuid'], rent_data) return resp