Skip to content

Commit

Permalink
Map missing values to null
Browse files Browse the repository at this point in the history
  • Loading branch information
leonardehrenfried committed Nov 25, 2021
1 parent e84e435 commit bddcc2a
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,10 @@ private TripTimeOnDate getSource(DataFetchingEnvironment environment) {
return environment.getSource();
}

/**
* Generally the missing values are removed during the graph build. However, for flex
* trips they are not and have to be converted to null here.
*/
private Integer missingValueToNull(int value) {
if(value == StopTime.MISSING_VALUE) {
return null;
Expand Down

0 comments on commit bddcc2a

Please sign in to comment.