Skip to content

Commit 80be203

Browse files
astanga-csastanga-cs
authored andcommitted
Fixed pylint
1 parent 665d257 commit 80be203

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

services/common/rs_server_common/utils/utils.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -258,10 +258,9 @@ def odata_to_stac(
258258
if stac_key == "id":
259259
feature_template["id"] = value
260260
continue
261-
if stac_key == "geometry":
261+
if stac_key == "geometry" and value:
262262
feature_template["geometry"] = value
263-
if feature_template["geometry"]:
264-
feature_template["bbox"] = _bbox_from_geometry(feature_template["geometry"])
263+
feature_template["bbox"] = _bbox_from_geometry(feature_template["geometry"])
265264
continue
266265
if stac_key in feature_template["assets"]["file"]:
267266
feature_template["assets"]["file"][stac_key] = value

tests/resources/endpoints/prip_feature_no_geometry.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,4 +72,4 @@
7272
}
7373
],
7474
"collection": "S1A_L0_IW_RAW"
75-
}
75+
}

0 commit comments

Comments
 (0)