From 80c122322cd4836739c5a57097aed11885d3740f Mon Sep 17 00:00:00 2001 From: Mads Bisgaard Date: Wed, 18 Dec 2024 21:21:35 +0100 Subject: [PATCH] @matusdrobuliak66 add license key to api-server model --- .../models/schemas/model_adapter.py | 4 +--- .../simcore_service_api_server/services_rpc/wb_api_server.py | 1 + 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/services/api-server/src/simcore_service_api_server/models/schemas/model_adapter.py b/services/api-server/src/simcore_service_api_server/models/schemas/model_adapter.py index 06da65580f8..9679b843beb 100644 --- a/services/api-server/src/simcore_service_api_server/models/schemas/model_adapter.py +++ b/services/api-server/src/simcore_service_api_server/models/schemas/model_adapter.py @@ -130,6 +130,7 @@ class ServicePricingPlanGetLegacy(BaseModel): class LicensedItemGet(BaseModel): licensed_item_id: LicensedItemID name: Annotated[str, Field(alias="display_name")] + license_key: str | None licensed_resource_type: LicensedResourceType pricing_plan_id: PricingPlanId created_at: datetime @@ -141,7 +142,4 @@ class LicensedItemGet(BaseModel): assert set(LicensedItemGet.model_fields.keys()) == set( _LicensedItemGet.model_fields.keys() - - { - "license_key" - } # NOTE: @bisgaard-itis please expose https://github.com/ITISFoundation/osparc-simcore/issues/6875 ) diff --git a/services/api-server/src/simcore_service_api_server/services_rpc/wb_api_server.py b/services/api-server/src/simcore_service_api_server/services_rpc/wb_api_server.py index 207712e3e47..98e23603419 100644 --- a/services/api-server/src/simcore_service_api_server/services_rpc/wb_api_server.py +++ b/services/api-server/src/simcore_service_api_server/services_rpc/wb_api_server.py @@ -35,6 +35,7 @@ async def get_licensed_items( LicensedItemGet( licensed_item_id=elm.licensed_item_id, name=elm.name, + license_key=elm.license_key, licensed_resource_type=elm.licensed_resource_type, pricing_plan_id=elm.pricing_plan_id, created_at=elm.created_at,