Commit 963c7a7c authored by Volker Krause's avatar Volker Krause
Browse files

Fix erroneous merging of train trips with the same line on the same day

Those should only be merged for unbound tickets, two bound tickets for
this case don't need to be the same.
parent 2a6a1f8e
Pipeline #91994 passed with stage
in 9 minutes and 54 seconds
......@@ -320,6 +320,8 @@ static bool isSameTrainTrip(const TrainTrip &lhs, const TrainTrip &rhs)
if (!lhs.departureTime().isValid() && !rhs.departureTime().isValid()) {
qCDebug(CompareLog) << "unbound trip" << lhs.departureStation().name() << rhs.departureStation().name() << lhs.arrivalStation().name() << rhs.arrivalStation().name();
return lhs.departureStation().name() == rhs.departureStation().name() && lhs.arrivalStation().name() == rhs.arrivalStation().name();
} else if (!equalAndPresent(lhs.departureTime(), rhs.departureTime())) {
return false;
}
if (lhs.trainNumber().isEmpty() || rhs.trainNumber().isEmpty()) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment