Skip to content

Commit a6e654e

Browse files
authored
fix: error when no location is included (#1071)
1 parent c9ecb4c commit a6e654e

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

api/src/feeds/impl/models/search_feed_item_result_impl.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,8 @@ def from_orm_gtfs_rt(cls, feed_search_row):
8383
@classmethod
8484
def resolve_locations(cls, locations):
8585
"""Resolve locations by country code."""
86+
if not locations or not isinstance(locations, list):
87+
return []
8688
return [
8789
{
8890
**location,

0 commit comments

Comments
 (0)