Skip to content

Commit

Permalink
#1403 hotfix - Update resolution to correctly get gender
Browse files Browse the repository at this point in the history
  • Loading branch information
originalname51 committed Sep 20, 2019
1 parent c08d1e7 commit 77e2f0a
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,9 @@ public Passenger findPassengerOnFlight(Flight f, PassengerVo pvo) {
// Find passenger by First Name, Last Name, and gender
if (!foundPassenger && newPaxHasGender) {
for (Passenger pax : flightPaxList) {
if (haveSameGender(pax, pvo)) {
if (haveSameGender(pax, pvo)
&& isNull(pax.getPassengerDetails().getDob())
&& isNull(pax.getDocuments())) {
existingPassenger = pax;
break;
}
Expand All @@ -278,7 +280,8 @@ public Passenger findPassengerOnFlight(Flight f, PassengerVo pvo) {
// Find passenger by First Name and Last Name
if (!foundPassenger) {
for (Passenger pax : flightPaxList) {
if (isNull(pax.getPassengerDetails().getDob()) && isNull(pax.getPassengerDetails().getGender())
if (isNull(pax.getPassengerDetails().getDob())
&& isNull(pax.getPassengerDetails().getGender())
&& isNull(pax.getDocuments())) {
existingPassenger = pax;

Expand Down

0 comments on commit 77e2f0a

Please sign in to comment.