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:
306
306
307
307
model_config = ConfigDict (
308
308
alias_generator = snake_to_camel ,
309
- populate_by_name = True ,
310
- str_strip_whitespace = True ,
311
- frozen = True ,
312
309
from_attributes = True ,
313
- extra = "ignore" ,
310
+ frozen = True ,
314
311
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" ,
315
316
)
316
317
317
318
def to_statics (self ) -> dict [str , Any ]:
Original file line number Diff line number Diff line change 63
63
)
64
64
65
65
66
- def _to_domain (products_row : Row , payments : PaymentFields ) -> Product :
66
+ def _db_to_domain (products_row : Row , payments : PaymentFields ) -> Product :
67
67
return Product (
68
68
** products_row ._asdict (),
69
69
is_payment_enabled = payments .enabled ,
@@ -115,7 +115,7 @@ async def list_products(
115
115
async for row in rows :
116
116
name = row .name
117
117
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 ))
119
119
120
120
assert name in FRONTEND_APPS_AVAILABLE # nosec
121
121
@@ -142,7 +142,7 @@ async def get_product(
142
142
payments = await _get_product_payment_fields (
143
143
conn , product_name = row .name
144
144
)
145
- return _to_domain (row , payments )
145
+ return _db_to_domain (row , payments )
146
146
return None
147
147
148
148
async def get_default_product_name (
You can’t perform that action at this time.
0 commit comments