Skip to content

Commit a29729b

Browse files
fix: id key name
1 parent d286654 commit a29729b

File tree

2 files changed

+3
-14
lines changed
  • services
    • static-webserver/client/source/class/osparc/data/model
    • web/server/src/simcore_service_webserver/functions/_controller

2 files changed

+3
-14
lines changed

services/static-webserver/client/source/class/osparc/data/model/Function.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ qx.Class.define("osparc.data.model.Function", {
2929
this.base(arguments);
3030

3131
this.set({
32-
uuid: functionData.uuid,
32+
uuid: functionData.uid,
3333
functionType: functionData.functionClass,
3434
name: functionData.name,
3535
description: functionData.description,

services/web/server/src/simcore_service_webserver/functions/_controller/_functions_rest.py

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
from aiohttp import web
2-
from common_library.dict_tools import remap_keys
32
from models_library.api_schemas_webserver.functions import (
43
Function,
54
FunctionToRegister,
@@ -128,12 +127,7 @@ async def list_functions(request: web.Request) -> web.Response:
128127
if project:
129128
chunk.append(
130129
TypeAdapter(RegisteredProjectFunctionGet).validate_python(
131-
remap_keys(
132-
function.model_dump(mode="json"),
133-
rename={
134-
"uid": "uuid",
135-
},
136-
)
130+
function.model_dump(mode="json")
137131
| {
138132
"thumbnail": (
139133
f"{project.thumbnail}" if project.thumbnail else None
@@ -198,12 +192,7 @@ async def get_function(request: web.Request) -> web.Response:
198192

199193
return envelope_json_response(
200194
TypeAdapter(RegisteredProjectFunctionGet).validate_python(
201-
remap_keys(
202-
registered_function.model_dump(mode="json"),
203-
rename={
204-
"uid": "uuid",
205-
},
206-
)
195+
registered_function.model_dump(mode="json")
207196
| {
208197
"thumbnail": project_dict.get("thumbnail", None),
209198
"template_id": project_dict.get("id", None),

0 commit comments

Comments
 (0)