mirror of
https://github.com/microsoft/onefuzz.git
synced 2025-06-11 09:41:37 +00:00
Fix bug when checking if the default cli application exists (#488)
This commit is contained in:
parent
0a1021447b
commit
cc1c79b27d
@ -328,11 +328,11 @@ class Client:
|
||||
|
||||
(password_id, password) = self.create_password(app.object_id)
|
||||
|
||||
cli_app = client.applications.list(filter="appId eq '%s'" % ONEFUZZ_CLI_APP)
|
||||
cli_app = list(
|
||||
client.applications.list(filter="appId eq '%s'" % ONEFUZZ_CLI_APP)
|
||||
)
|
||||
|
||||
onefuzz_cli_app_uuid = uuid.UUID(ONEFUZZ_CLI_APP)
|
||||
|
||||
if not cli_app:
|
||||
if len(cli_app) == 0:
|
||||
logger.info(
|
||||
"Could not find the default CLI application under the current "
|
||||
"subscription, creating a new one"
|
||||
@ -346,7 +346,7 @@ class Client:
|
||||
}
|
||||
|
||||
else:
|
||||
authorize_application(onefuzz_cli_app_uuid, app.app_id)
|
||||
authorize_application(uuid.UUID(ONEFUZZ_CLI_APP), app.app_id)
|
||||
|
||||
self.results["client_id"] = app.app_id
|
||||
self.results["client_secret"] = password
|
||||
|
Loading…
x
Reference in New Issue
Block a user