Skip to content

Commit 2cc0fb6

Browse files
committed
fix: cant deploy to same namespace if organization_id incorrectly set
1 parent 0f5972e commit 2cc0fb6

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

scw_serverless/utils/credentials.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ def get_scw_client(
1818
"""Attempts to load the profile. Will raise on invalid profiles."""
1919
client = Client.from_config_file_and_env(profile_name)
2020
_update_client_from_cli(client, secret_key, project_id, region)
21+
2122
return _validate_client(client)
2223

2324

@@ -47,3 +48,7 @@ def _update_client_from_cli(
4748
if not client.default_region:
4849
get_logger().info(f"No region was configured, using {DEFAULT_REGION}")
4950
client.default_region = DEFAULT_REGION
51+
52+
# Not used by the API framework
53+
# Can lead to issues if project_id does not belong to organization
54+
client.default_organization_id = None

0 commit comments

Comments
 (0)