Skip to content

Commit bff182a

Browse files
committed
Fix tests
1 parent 2c1df3c commit bff182a

File tree

3 files changed

+16
-16
lines changed

3 files changed

+16
-16
lines changed

services/api-server/openapi.json

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -9954,42 +9954,42 @@
99549954
{
99559955
"oneOf": [
99569956
{
9957-
"$ref": "#/components/schemas/RegisteredProjectFunctionJob"
9957+
"$ref": "#/components/schemas/RegisteredProjectFunctionJobWithStatus"
99589958
},
99599959
{
9960-
"$ref": "#/components/schemas/RegisteredPythonCodeFunctionJob"
9960+
"$ref": "#/components/schemas/RegisteredPythonCodeFunctionJobWithStatus"
99619961
},
99629962
{
9963-
"$ref": "#/components/schemas/RegisteredSolverFunctionJob"
9963+
"$ref": "#/components/schemas/RegisteredSolverFunctionJobWithStatus"
99649964
}
99659965
],
99669966
"discriminator": {
99679967
"propertyName": "function_class",
99689968
"mapping": {
9969-
"PROJECT": "#/components/schemas/RegisteredProjectFunctionJob",
9970-
"PYTHON_CODE": "#/components/schemas/RegisteredPythonCodeFunctionJob",
9971-
"SOLVER": "#/components/schemas/RegisteredSolverFunctionJob"
9969+
"PROJECT": "#/components/schemas/RegisteredProjectFunctionJobWithStatus",
9970+
"PYTHON_CODE": "#/components/schemas/RegisteredPythonCodeFunctionJobWithStatus",
9971+
"SOLVER": "#/components/schemas/RegisteredSolverFunctionJobWithStatus"
99729972
}
99739973
}
99749974
},
99759975
{
99769976
"oneOf": [
99779977
{
9978-
"$ref": "#/components/schemas/RegisteredProjectFunctionJobWithStatus"
9978+
"$ref": "#/components/schemas/RegisteredProjectFunctionJob"
99799979
},
99809980
{
9981-
"$ref": "#/components/schemas/RegisteredPythonCodeFunctionJobWithStatus"
9981+
"$ref": "#/components/schemas/RegisteredPythonCodeFunctionJob"
99829982
},
99839983
{
9984-
"$ref": "#/components/schemas/RegisteredSolverFunctionJobWithStatus"
9984+
"$ref": "#/components/schemas/RegisteredSolverFunctionJob"
99859985
}
99869986
],
99879987
"discriminator": {
99889988
"propertyName": "function_class",
99899989
"mapping": {
9990-
"PROJECT": "#/components/schemas/RegisteredProjectFunctionJobWithStatus",
9991-
"PYTHON_CODE": "#/components/schemas/RegisteredPythonCodeFunctionJobWithStatus",
9992-
"SOLVER": "#/components/schemas/RegisteredSolverFunctionJobWithStatus"
9990+
"PROJECT": "#/components/schemas/RegisteredProjectFunctionJob",
9991+
"PYTHON_CODE": "#/components/schemas/RegisteredPythonCodeFunctionJob",
9992+
"SOLVER": "#/components/schemas/RegisteredSolverFunctionJob"
99939993
}
99949994
}
99959995
}

services/api-server/src/simcore_service_api_server/api/routes/function_jobs_routes.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ async def list_function_jobs(
137137
] = False,
138138
):
139139
if include_status:
140-
function_jobs_list, meta = (
140+
function_jobs_list_ws, meta = (
141141
await function_job_service.list_function_jobs_with_status(
142142
pagination_offset=page_params.offset,
143143
pagination_limit=page_params.limit,
@@ -148,7 +148,7 @@ async def list_function_jobs(
148148
)
149149
# the code below should ideally be in the service layer, but this can only be done if the
150150
# celery status resolution is done in the service layer too
151-
for function_job_wso in function_jobs_list:
151+
for function_job_wso in function_jobs_list_ws:
152152
if (
153153
function_job_wso.status.status
154154
not in (
@@ -180,7 +180,7 @@ async def list_function_jobs(
180180
)
181181

182182
return create_page(
183-
function_jobs_list,
183+
function_jobs_list_ws,
184184
total=meta.total,
185185
params=page_params,
186186
)

services/api-server/src/simcore_service_api_server/models/domain/functions.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ class PreRegisteredFunctionJobData(BaseModel):
1515

1616

1717
class PageRegisteredFunctionJobWithorWithoutStatus(
18-
Page[RegisteredFunctionJob | RegisteredFunctionJobWithStatus]
18+
Page[RegisteredFunctionJobWithStatus | RegisteredFunctionJob] # order is important
1919
):
2020
# This class is created specifically to provide a name for this in openapi.json.
2121
# When using an alias the python-client generates too long file name

0 commit comments

Comments
 (0)