Skip to content

Commit

Permalink
Merge pull request #10 from zbeach/master
Browse files Browse the repository at this point in the history
Added condition to recordDescribesRouteDrivingShift
  • Loading branch information
zbeach authored Jan 6, 2018
2 parents 6bb85d4 + 3d25ee5 commit 35cafc2
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 35cafc2

Please sign in to comment.