File tree Expand file tree Collapse file tree 1 file changed +2
-4
lines changed
services/common/rs_server_common/utils Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Original file line number Diff line number Diff line change 3737 Path (osp .realpath (osp .dirname (__file__ ))).parent .parent / "config" / "product_type_mapping.yaml"
3838)
3939PTYPE_MAPPING_FILE = Path (os .environ .get ("PTYPE_MAPPING_CONFIG" , LOCAL_PTYPE_MAPPING_FILE ))
40+ with PTYPE_MAPPING_FILE .open ("r" , encoding = "utf-8" ) as f :
41+ product_type_data = yaml .safe_load (f )["types" ]
4042
4143
4244def validate_str_list (parameter : str ) -> list | str :
@@ -316,10 +318,6 @@ def extract_eo_product(eo_product: EOProduct, mapper: dict) -> dict:
316318
317319def _apply_product_facets (feature : dict , _odata : dict ) -> None :
318320 """Sets product:type, processing:level - temporary hardcoded until RSPY-760 is DONE"""
319-
320- with PTYPE_MAPPING_FILE .open ("r" , encoding = "utf-8" ) as f :
321- product_type_data = yaml .safe_load (f )["types" ]
322-
323321 props : dict [str , str ] = feature ["properties" ]
324322 if not (
325323 all (k in props for k in ("product:type" , "processing:level" ))
You can’t perform that action at this time.
0 commit comments