Skip to content

Commit a05761f

Browse files
committed
Use style instead of operative field as operative doesn't tell anything...
1 parent c992859 commit a05761f

2 files changed

Lines changed: 6 additions & 6 deletions

File tree

src/ext-test/resources/smoovebikerental/smoove.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"name" : "A04 Hamn",
55
"operative" : true,
66
"coordinates" : "60.167913, 24.952269",
7-
"style" : "",
7+
"style" : "Station on",
88
"avl_bikes" : 1,
99
"free_slots" : 11,
1010
"total_slots" : 12
@@ -13,7 +13,7 @@
1313
"name" : "B05 Fake",
1414
"operative" : false,
1515
"coordinates" : "60, 24",
16-
"style" : "",
16+
"style" : "Station off",
1717
"avl_bikes" : 5,
1818
"free_slots" : 5,
1919
"total_slots" : 5
@@ -22,7 +22,7 @@
2222
"name" : "B06 Foo",
2323
"operative" : true,
2424
"coordinates" : "61,25",
25-
"style" : "",
25+
"style" : "Station on",
2626
"avl_bikes" : 5,
2727
"free_slots" : 5,
2828
"total_slots" : 5
@@ -31,7 +31,7 @@
3131
"name" : "B08 Invalid",
3232
"operative" : true,
3333
"coordinates" : "",
34-
"style" : "",
34+
"style" : "Station on",
3535
"avl_bikes" : 5,
3636
"free_slots" : 5,
3737
"total_slots" : 5
@@ -40,7 +40,7 @@
4040
"name" : "B09 Full",
4141
"operative" : true,
4242
"coordinates" : "60.168913, 24.953269",
43-
"style" : "",
43+
"style" : "Station on",
4444
"avl_bikes" : 12,
4545
"free_slots" : 0,
4646
"total_slots" : 12

src/ext/java/org/opentripplanner/ext/smoovebikerental/SmooveBikeRentalDataSource.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ protected VehicleRentalStation parseElement(JsonNode node) {
7070
log.warn("Error parsing bike rental station {}", station.id, e);
7171
return null;
7272
}
73-
if (!node.path("operative").asText().equals("true")) {
73+
if (!node.path("style").asText().equals("Station on")) {
7474
station.isRenting = false;
7575
station.isReturning = false;
7676
station.vehiclesAvailable = 0;

0 commit comments

Comments
 (0)