Skip to content

Commit 55dbb0d

Browse files
authored
Merge pull request #273 from HSLdevcom/DT-2715-fix
Try fetching station if stop not found
2 parents 118b7d4 + a9001cc commit 55dbb0d

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/main/java/org/opentripplanner/index/IndexGraphQLSchema.java

+6-1
Original file line numberDiff line numberDiff line change
@@ -2425,7 +2425,12 @@ private Object getObject(String idString) {
24252425
Integer.parseInt(parts[0], 10));
24262426
}
24272427
if (id.type.equals(stopType.getName())) {
2428-
return index.stopForId.get(FeedScopedId.convertFromString(id.id));
2428+
Stop matchedStop = index.stopForId.get(FeedScopedId.convertFromString(id.id));
2429+
if (matchedStop == null) {
2430+
matchedStop = index.stationForId.get(FeedScopedId.convertFromString(id.id));
2431+
}
2432+
2433+
return matchedStop;
24292434
}
24302435
if (id.type.equals(tripType.getName())) {
24312436
return index.tripForId.get(FeedScopedId.convertFromString(id.id));

0 commit comments

Comments
 (0)