Skip to content

Commit

Permalink
feat: use default project id like 0 if configuration is none
Browse files Browse the repository at this point in the history
  • Loading branch information
Romazes committed Dec 19, 2024
1 parent cf0d691 commit ebaa82b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lean/container.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,9 @@ def get_project_id(project_config: Storage):
str: The 'cloud-id' if it exists, otherwise the 'local-id'.
If neither is found, returns None.
"""
if not project_config:
container.logger.debug("get_project_id: Project configuration is missing. Using default project ID: '0'")
return '0'
return project_config.get("cloud-id") or project_config.get("local-id")


Expand Down

0 comments on commit ebaa82b

Please sign in to comment.