Skip to content

Commit

Permalink
Merge pull request #156 from galaxyproject/increase_robustness
Browse files Browse the repository at this point in the history
Increase robustness against null values when processing install templ…
  • Loading branch information
nuwang authored Sep 14, 2022
2 parents 8b25ce5 + de8a861 commit d32b0f8
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 d32b0f8

Please sign in to comment.