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

Commit cc1c79b

Browse files
authored
Fix bug when checking if the default cli application exists (#488)
1 parent 0a10214 commit cc1c79b

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/deployment/deploy.py

+5-5
Original file line numberDiff line numberDiff line change
@@ -328,11 +328,11 @@ def setup_rbac(self) -> None:
328328

329329
(password_id, password) = self.create_password(app.object_id)
330330

331-
cli_app = client.applications.list(filter="appId eq '%s'" % ONEFUZZ_CLI_APP)
332-
333-
onefuzz_cli_app_uuid = uuid.UUID(ONEFUZZ_CLI_APP)
331+
cli_app = list(
332+
client.applications.list(filter="appId eq '%s'" % ONEFUZZ_CLI_APP)
333+
)
334334

335-
if not cli_app:
335+
if len(cli_app) == 0:
336336
logger.info(
337337
"Could not find the default CLI application under the current "
338338
"subscription, creating a new one"
@@ -346,7 +346,7 @@ def setup_rbac(self) -> None:
346346
}
347347

348348
else:
349-
authorize_application(onefuzz_cli_app_uuid, app.app_id)
349+
authorize_application(uuid.UUID(ONEFUZZ_CLI_APP), app.app_id)
350350

351351
self.results["client_id"] = app.app_id
352352
self.results["client_secret"] = password

0 commit comments

Comments
 (0)