diff --git a/osm_fieldwork/filter_data.py b/osm_fieldwork/filter_data.py index 814e3bde..e730e37c 100755 --- a/osm_fieldwork/filter_data.py +++ b/osm_fieldwork/filter_data.py @@ -117,8 +117,8 @@ def parse( "tourism", ) self.keep = list(keep) - if "keep" in config["keep"]: - self.keep.extend(config["keep"]) + if "keep" in config.config["keep"]: + self.keep.extend(config.config["keep"]) return title, extract diff --git a/osm_fieldwork/make_data_extract.py b/osm_fieldwork/make_data_extract.py index de04e3df..351984a6 100755 --- a/osm_fieldwork/make_data_extract.py +++ b/osm_fieldwork/make_data_extract.py @@ -33,6 +33,7 @@ from osm_fieldwork.data_models import data_models_path from osm_fieldwork.filter_data import FilterData from osm_fieldwork.xlsforms import xlsforms_path +from osm_rawdata.config import QueryConfig # Instantiate logger log = logging.getLogger(__name__) @@ -81,6 +82,7 @@ def __init__( else: file = open(f"{xlsforms_path}/{xlsfile}", "rb") self.xls = BytesIO(file.read()) + self.config = QueryConfig(config) def getFeatures( self, @@ -126,7 +128,7 @@ def cleanFeatures( """ log.debug("Cleaning features") cleaned = FilterData() - cleaned.parse(self.xls) + cleaned.parse(self.xls, self.config) new = cleaned.cleanData(collection) # jsonfile = open(filespec, "w") # dump(new, jsonfile)