Skip to content
This repository was archived by the owner on Sep 22, 2023. It is now read-only.

Commit 24e1857

Browse files
committed
Fix - broken admin keypairs command
* user_id parameter is changed into email in the manager.
1 parent fd01d78 commit 24e1857

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/ai/backend/client/keypair.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -137,8 +137,8 @@ async def list(cls, user_id: Union[int, str] = None,
137137
'}'
138138
else:
139139
uid_type = 'Int!' if isinstance(user_id, int) else 'String!'
140-
q = 'query($user_id: {0}, $is_active: Boolean) {{'.format(uid_type) + \
141-
' keypairs(user_id: $user_id, is_active: $is_active) {' \
140+
q = 'query($email: {0}, $is_active: Boolean) {{'.format(uid_type) + \
141+
' keypairs(email: $email, is_active: $is_active) {' \
142142
' $fields' \
143143
' }' \
144144
'}'
@@ -147,7 +147,7 @@ async def list(cls, user_id: Union[int, str] = None,
147147
'is_active': is_active,
148148
}
149149
if user_id is not None:
150-
variables['user_id'] = user_id
150+
variables['email'] = user_id
151151
rqst = Request(cls.session, 'POST', '/admin/graphql')
152152
rqst.set_json({
153153
'query': q,

0 commit comments

Comments
 (0)