diff --git a/server/app/app.py b/server/app/app.py index 03e2bb95..4dfd2a67 100644 --- a/server/app/app.py +++ b/server/app/app.py @@ -26,14 +26,14 @@ webbp = Blueprint("webapp", "server.common.web", template_folder="templates") def dataset_index(dataset=None): config = current_app.app_config if dataset is None: - if config.datapath: - location = config.datapath + if config.single_dataset__datapath: + location = config.single_dataset__datapath else: return dataroot_index() else: - location = path_join(config.dataroot, dataset) + location = path_join(config.multi_dataset__dataroot, dataset) - scripts = config.scripts + scripts = config.server__scripts try: cache_manager = current_app.matrix_data_cache_manager @@ -59,13 +59,13 @@ def get_data_adaptor(dataset=None): config = current_app.app_config if dataset is None: - datapath = config.datapath + datapath = config.single_dataset__datapath else: - datapath = path_join(config.dataroot, dataset) + datapath = path_join(config.multi_dataset__dataroot, dataset) # path_join returns a normalized path. Therefore it is # sufficient to check that the datapath starts with the # dataroot to determine that the datapath is under the dataroot. - if not datapath.startswith(config.dataroot): + if not datapath.startswith(config.multi_dataset__dataroot): raise DatasetAccessError("Invalid dataset {dataset}") if datapath is None: @@ -100,10 +100,10 @@ def dataroot_test_index(): try: config = current_app.app_config - locator = DataLocator(config.dataroot) + locator = DataLocator(config.multi_dataset__dataroot) datasets = [] for fname in locator.ls(): - location = path_join(config.dataroot, fname) + location = path_join(config.multi_dataset__dataroot, fname) try: MatrixDataLoader(location, app_config=config) datasets.append(fname) @@ -118,7 +118,7 @@ def dataroot_test_index(): data += f"