Skip to content

Commit c06a353

Browse files
committed
use from_attributes
1 parent 3b3da02 commit c06a353

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

services/web/server/src/simcore_service_webserver/functions/_functions_repository.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -467,7 +467,7 @@ async def list_function_jobs(
467467
)
468468

469469
return [
470-
RegisteredFunctionJobDB.model_validate(dict(row)) for row in rows
470+
RegisteredFunctionJobDB.model_validate(row) for row in rows
471471
], PageMetaInfoLimitOffset(
472472
total=total_count_result,
473473
offset=pagination_offset,
@@ -568,7 +568,7 @@ async def list_function_job_collections(
568568

569569
collections = []
570570
for row in rows:
571-
collection = RegisteredFunctionJobCollectionDB.model_validate(dict(row))
571+
collection = RegisteredFunctionJobCollectionDB.model_validate(row)
572572
job_result = await conn.stream(
573573
function_job_collections_to_function_jobs_table.select().where(
574574
function_job_collections_to_function_jobs_table.c.function_job_collection_uuid
@@ -678,7 +678,7 @@ async def update_function_title(
678678
if row is None:
679679
raise FunctionIDNotFoundError(function_id=function_id)
680680

681-
return RegisteredFunctionDB.model_validate(dict(row))
681+
return RegisteredFunctionDB.model_validate(row)
682682

683683

684684
async def update_function_description(
@@ -763,7 +763,7 @@ async def get_function_job(
763763
if row is None:
764764
raise FunctionJobIDNotFoundError(function_job_id=function_job_id)
765765

766-
return RegisteredFunctionJobDB.model_validate(dict(row))
766+
return RegisteredFunctionJobDB.model_validate(row)
767767

768768

769769
async def delete_function_job(
@@ -919,7 +919,7 @@ async def get_function_job_collection(
919919
[job_row["function_job_uuid"] for job_row in job_rows] if job_rows else []
920920
)
921921

922-
job_collection = RegisteredFunctionJobCollectionDB.model_validate(dict(row))
922+
job_collection = RegisteredFunctionJobCollectionDB.model_validate(row)
923923

924924
return job_collection, job_ids
925925

0 commit comments

Comments
 (0)