Skip to content

Commit

Permalink
Added condition to recordDescribesRouteDrivingShift
Browse files Browse the repository at this point in the history
Position name must not be "Training"
  • Loading branch information
zbeach committed Jan 6, 2018
1 parent fc445df commit 3d25ee5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/main/java/main/CSVReader.java
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,8 @@ public static String[] getRouteDrivingPositionsOnDate(Date date) {
* @return true if the record describes a route driving shift, or false if it doesn't
*/
public static boolean recordDescribesRouteDrivingShift(CSVRecord csvRecord) {
return csvRecord.get(Header.PERIOD).length() == 1;
return csvRecord.get(Header.PERIOD).length() == 1
&& !csvRecord.get(Header.POSITION_NAME).equals("Training");
}

/**
Expand Down

0 comments on commit 3d25ee5

Please sign in to comment.