File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
services/common/rs_server_common/utils Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -252,13 +252,16 @@ def _apply_product_facets(feature: dict, _odata: dict) -> None:
252252 with PTYPE_MAPPING_FILE .open ("r" , encoding = "utf-8" ) as f :
253253 product_type_data = yaml .safe_load (f )["types" ]
254254
255- props = feature ["properties" ]
255+ props : dict [ str , str ] = feature ["properties" ]
256256 if not (
257257 all (k in props for k in ("product:type" , "processing:level" ))
258258 and any (k in props for k in ("sar:instrument_mode" , "eopf:instrument_mode" , "instrument_mode" ))
259259 ):
260260 return
261- legacy_type = next ((item for item in product_type_data if item .get ("legacyType" ) == props ["product:type" ]), None )
261+ legacy_type : dict [str , str ] = next (
262+ (item for item in product_type_data if item .get ("legacyType" ) == props ["product:type" ]),
263+ {},
264+ )
262265 props ["product:type" ] = legacy_type ["productType" ]
263266 props ["processing:level" ] = legacy_type ["processingLevel" ]
264267
You can’t perform that action at this time.
0 commit comments