Skip to content

Commit

Permalink
Increase robustness against null values when processing install templ…
Browse files Browse the repository at this point in the history
…ates
  • Loading branch information
nuwang committed Sep 14, 2022
1 parent e0da023 commit de8a861
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cloudman/projman/management/commands/projman_load_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@ def add_arguments(self, parser):

def handle(self, *args, **options):
settings = yaml.safe_load(options['config_file'].read())
self.process_settings(settings)
self.process_settings(settings or {})

@staticmethod
def process_settings(settings):
projects = settings.get('projects')
for project in projects or {}:
if project:
call_command("projman_create_project", project)
charts = projects.get(project).get('charts', [])
charts = projects.get(project, {}).get('charts', [])
for key in charts or []:
chart = charts.get(key)
template = chart.get("install_template")
Expand Down

0 comments on commit de8a861

Please sign in to comment.