@@ -3199,23 +3199,26 @@ def validate_item_search_ids(
3199
3199
r_session = r_session ,
3200
3200
)
3201
3201
3202
- items = body .get ("features" ) # type: ignore
3203
- if items and len (items ) >= 2 :
3204
- _validate_search_ids_with_ids (
3205
- search_url , [items [0 ].get ("id" )], methods , errors , r_session
3206
- )
3207
- _validate_search_ids_with_ids (
3208
- search_url ,
3209
- [items [0 ].get ("id" ), items [1 ].get ("id" )],
3210
- methods ,
3211
- errors ,
3212
- r_session ,
3213
- )
3214
- _validate_search_ids_with_ids (
3215
- search_url , [i ["id" ] for i in items ], methods , errors , r_session
3216
- )
3202
+ if not body :
3203
+ errors += f"[{ Context .ITEM_SEARCH } ] GET Search body was empty"
3217
3204
else :
3218
- warnings += f"[{ Context .ITEM_SEARCH } ] GET Search with no parameters returned < 2 results"
3205
+ items = body .get ("features" ) # type: ignore
3206
+ if items and len (items ) >= 2 :
3207
+ _validate_search_ids_with_ids (
3208
+ search_url , [items [0 ].get ("id" )], methods , errors , r_session
3209
+ )
3210
+ _validate_search_ids_with_ids (
3211
+ search_url ,
3212
+ [items [0 ].get ("id" ), items [1 ].get ("id" )],
3213
+ methods ,
3214
+ errors ,
3215
+ r_session ,
3216
+ )
3217
+ _validate_search_ids_with_ids (
3218
+ search_url , [i ["id" ] for i in items ], methods , errors , r_session
3219
+ )
3220
+ else :
3221
+ warnings += f"[{ Context .ITEM_SEARCH } ] GET Search with no parameters returned < 2 results"
3219
3222
3220
3223
3221
3224
def validate_item_search_ids_does_not_override_all_other_params (
@@ -3236,7 +3239,7 @@ def validate_item_search_ids_does_not_override_all_other_params(
3236
3239
content_type = geojson_mt ,
3237
3240
r_session = r_session ,
3238
3241
)
3239
- if body .get ("features" ): # type: ignore
3242
+ if body and body .get ("features" ): # type: ignore
3240
3243
_validate_search_ids_with_ids_no_override (
3241
3244
search_url ,
3242
3245
body ["features" ][0 ],
0 commit comments