Skip to content

Commit

Permalink
fix: fix error when creating secret_id is None during auto sync
Browse files Browse the repository at this point in the history
Signed-off-by: ImMin5 <[email protected]>
  • Loading branch information
ImMin5 committed Oct 16, 2024
1 parent 565d363 commit adf2ac9
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/spaceone/identity/service/job_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -871,9 +871,11 @@ def _create_service_account(
if secret_data:
secret_mgr: SecretManager = self.locator.get_manager("SecretManager")
secret_id = service_account_vo.secret_id
secret_total_count = 0

response = secret_mgr.list_secrets({"secret_id": secret_id}, domain_id)
secret_total_count = response.get("total_count", 0)
if secret_id:
response = secret_mgr.list_secrets({"secret_id": secret_id}, domain_id)
secret_total_count = response.get("total_count", 0)

if secret_total_count > 0:
update_secret_params = {
Expand Down

0 comments on commit adf2ac9

Please sign in to comment.