Skip to content

Commit

Permalink
Merge pull request #394 from ImMin5/master
Browse files Browse the repository at this point in the history
fix error when creating secret_id is None during auto sync
  • Loading branch information
ImMin5 authored Oct 16, 2024
2 parents 565d363 + adf2ac9 commit 7b1c302
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 7b1c302

Please sign in to comment.