Skip to content

Commit 20d5486

Browse files
committed
mypy and oas
1 parent 8d35cf7 commit 20d5486

File tree

2 files changed

+3
-41
lines changed

2 files changed

+3
-41
lines changed

services/web/server/src/simcore_service_webserver/api/v0/openapi.yaml

Lines changed: 0 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1328,28 +1328,6 @@ paths:
13281328
application/json:
13291329
schema:
13301330
$ref: '#/components/schemas/Envelope_list_MyPermissionGet__'
1331-
/v0/users/{user_id}:
1332-
get:
1333-
tags:
1334-
- users
1335-
summary: Get User
1336-
operationId: get_user
1337-
parameters:
1338-
- name: user_id
1339-
in: path
1340-
required: true
1341-
schema:
1342-
type: integer
1343-
exclusiveMinimum: true
1344-
title: User Id
1345-
minimum: 0
1346-
responses:
1347-
'200':
1348-
description: Successful Response
1349-
content:
1350-
application/json:
1351-
schema:
1352-
$ref: '#/components/schemas/Envelope_UserGet_'
13531331
/v0/users:search:
13541332
post:
13551333
tags:
@@ -8617,19 +8595,6 @@ components:
86178595
title: Error
86188596
type: object
86198597
title: Envelope[UserForAdminGet]
8620-
Envelope_UserGet_:
8621-
properties:
8622-
data:
8623-
anyOf:
8624-
- $ref: '#/components/schemas/UserGet'
8625-
- type: 'null'
8626-
error:
8627-
anyOf:
8628-
- {}
8629-
- type: 'null'
8630-
title: Error
8631-
type: object
8632-
title: Envelope[UserGet]
86338598
Envelope_WalletGetWithAvailableCredits_:
86348599
properties:
86358600
data:

services/web/server/src/simcore_service_webserver/groups/_groups_repository.py

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
from models_library.users import UserID
2121
from simcore_postgres_database.errors import UniqueViolation
2222
from simcore_postgres_database.models.users import users
23-
from simcore_postgres_database.utils import as_postgres_sql_query_str
2423
from simcore_postgres_database.utils_products import execute_get_or_create_product_group
2524
from simcore_postgres_database.utils_repos import (
2625
pass_or_acquire_connection,
@@ -515,8 +514,6 @@ async def list_users_in_group(
515514
)
516515
)
517516

518-
print(as_postgres_sql_query_str(query))
519-
520517
result = await conn.execute(query)
521518
group_row = result.first()
522519
if not group_row:
@@ -541,10 +538,10 @@ async def list_users_in_group(
541538
user_to_groups.c.gid == group_id
542539
)
543540

544-
result = await conn.stream(query)
541+
aresult = await conn.stream(query)
545542
return [
546543
GroupMember.model_validate(row, from_attributes=True)
547-
async for row in result
544+
async for row in aresult
548545
]
549546

550547

@@ -742,7 +739,7 @@ async def auto_add_user_to_groups(
742739

743740
# auto add user to the groups with the right rules
744741
# get the groups where there are inclusion rules and see if they apply
745-
query = sa.select(groups).where(groups.c.inclusion_rules != {})
742+
query = sa.select(groups).where(groups.c.inclusion_rules != "{}")
746743
possible_group_ids = set()
747744

748745
async with transaction_context(get_asyncpg_engine(app), connection) as conn:

0 commit comments

Comments
 (0)