Skip to content

Commit

Permalink
get env from index
Browse files Browse the repository at this point in the history
  • Loading branch information
Ariana Barzinpour committed Jul 25, 2024
1 parent 793d001 commit 347f2a6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions datacube/api/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,9 +120,9 @@ def __init__(self,
return

# Obtain an ODCEnvironment object:
self.cfg_env = ODCConfig.get_environment(env=env, config=config, raw_config=raw_config)
cfg_env = ODCConfig.get_environment(env=env, config=config, raw_config=raw_config)

self.index = index_connect(self.cfg_env,
self.index = index_connect(cfg_env,
application_name=app,
validate_connection=validate_connection)

Expand Down Expand Up @@ -550,7 +550,7 @@ def filter_jan(dataset): return dataset.time.begin.month == 1

if skip_broken_datasets is None:
# default to value from env var, which defaults to False
skip_broken_datasets = self.cfg_env["skip_broken_datasets"]
skip_broken_datasets = self.index.environment["skip_broken_datasets"]

result = self.load_data(grouped, geobox,
measurement_dicts,
Expand Down

0 comments on commit 347f2a6

Please sign in to comment.