File tree Expand file tree Collapse file tree 2 files changed +8
-7
lines changed
services/web/server/src/simcore_service_webserver/products Expand file tree Collapse file tree 2 files changed +8
-7
lines changed Original file line number Diff line number Diff line change @@ -306,12 +306,13 @@ def _update_json_schema_extra(schema: JsonDict) -> None:
306306
307307 model_config = ConfigDict (
308308 alias_generator = snake_to_camel ,
309- populate_by_name = True ,
310- str_strip_whitespace = True ,
311- frozen = True ,
312309 from_attributes = True ,
313- extra = "ignore" ,
310+ frozen = True ,
314311 json_schema_extra = _update_json_schema_extra ,
312+ str_strip_whitespace = True ,
313+ validate_by_alias = True ,
314+ validate_by_name = True ,
315+ extra = "ignore" ,
315316 )
316317
317318 def to_statics (self ) -> dict [str , Any ]:
Original file line number Diff line number Diff line change 6363)
6464
6565
66- def _to_domain (products_row : Row , payments : PaymentFields ) -> Product :
66+ def _db_to_domain (products_row : Row , payments : PaymentFields ) -> Product :
6767 return Product (
6868 ** products_row ._asdict (),
6969 is_payment_enabled = payments .enabled ,
@@ -115,7 +115,7 @@ async def list_products(
115115 async for row in rows :
116116 name = row .name
117117 payments = await _get_product_payment_fields (conn , product_name = name )
118- app_products .append (_to_domain (row , payments ))
118+ app_products .append (_db_to_domain (row , payments ))
119119
120120 assert name in FRONTEND_APPS_AVAILABLE # nosec
121121
@@ -142,7 +142,7 @@ async def get_product(
142142 payments = await _get_product_payment_fields (
143143 conn , product_name = row .name
144144 )
145- return _to_domain (row , payments )
145+ return _db_to_domain (row , payments )
146146 return None
147147
148148 async def get_default_product_name (
You can’t perform that action at this time.
0 commit comments