Skip to content

Commit

Permalink
Merge pull request #108 from viniciusdc/fix_107_conda_envs
Browse files Browse the repository at this point in the history
Add missing handle for Callable `conda_envs` object
  • Loading branch information
danlester committed Sep 7, 2022
2 parents d6e58b3 + 065e6b3 commit 26d857d
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion cdsdashboards/hubextension/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,12 @@ async def post(self, dashboard_urlname=None):
cdsconfig = CDSConfigStore.get_instance(self.settings['config'])

merged_presentation_types = cdsconfig.merged_presentation_types
all_conda_envs = cdsconfig.conda_envs

if callable(cdsconfig.conda_envs):
all_conda_envs = cdsconfig.conda_envs()
else:
all_conda_envs = cdsconfig.conda_envs

allow_custom_conda_env = cdsconfig.allow_custom_conda_env

if not dashboard_presentation_type in merged_presentation_types:
Expand Down

0 comments on commit 26d857d

Please sign in to comment.