Skip to content

Commit

Permalink
fix(jans-cli-tui): search attribute (#6630)
Browse files Browse the repository at this point in the history
  • Loading branch information
devrimyatar committed Nov 27, 2023
1 parent 9481c53 commit 361f52b
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions jans-cli-tui/cli_tui/plugins/010_auth_server/attributes.py
Original file line number Diff line number Diff line change
Expand Up @@ -201,11 +201,15 @@ async def coroutine():
operation_id = 'put-attributes' if 'inum' in dialog.data else 'post-attributes'
cli_args = {'operation_id': operation_id, 'data': new_data}
self.app.start_progressing(_("Saving Attribute ..."))
await get_event_loop().run_in_executor(self.app.executor, self.app.cli_requests, cli_args)
response = await get_event_loop().run_in_executor(self.app.executor, self.app.cli_requests, cli_args)
self.app.stop_progressing()
self.get_attributes()
common_data.claims_retreived = False

if response.status_code in (200, 201):
self.app.start_progressing(_("Attribute was saved"))
self.get_attributes()
common_data.claims_retreived = False
else:
self.myparent.show_message(_("A server error ocurred while saving attribute"), str(response.text), tobefocused=self.main_container)
asyncio.ensure_future(coroutine())


Expand Down Expand Up @@ -261,7 +265,7 @@ def get_attributes(self,
pattern (str, optional): an optional argument for searching attribute.
"""

asyncio.ensure_future(self.get_attributes_coroutine())
asyncio.ensure_future(self.get_attributes_coroutine(start_index, pattern))



Expand Down

0 comments on commit 361f52b

Please sign in to comment.