diff --git a/src/spaceone/identity/service/job_service.py b/src/spaceone/identity/service/job_service.py index ee47f035..076aac6a 100644 --- a/src/spaceone/identity/service/job_service.py +++ b/src/spaceone/identity/service/job_service.py @@ -505,7 +505,10 @@ def _create_workspace( if workspace_vo.name != name: params.update({"name": name}) - if workspace_vo.references and reference_id not in workspace_vo.references: + + if not workspace_vo.references: + params.update({"references": [reference_id]}) + elif reference_id not in workspace_vo.references: params.update({"references": workspace_vo.references + [reference_id]}) params.update({"last_synced_at": datetime.utcnow()})