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