Skip to content

Commit

Permalink
refactor(PersistenceTestUtils.java): Updated to guard against null OT…
Browse files Browse the repository at this point in the history
…P users when deleting
  • Loading branch information
br648 committed Oct 16, 2024
1 parent 35fc49a commit 4b2c569
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -270,9 +270,11 @@ static Itinerary createItinerary() {

public static void deleteOtpUser(OtpUser... optUsers) {
for (OtpUser otpUser : optUsers) {
OtpUser user = Persistence.otpUsers.getById(otpUser.id);
if (user != null) {
user.delete(user.auth0UserId != null);
if (otpUser != null) {
OtpUser user = Persistence.otpUsers.getById(otpUser.id);
if (user != null) {
user.delete(user.auth0UserId != null);
}
}
}
}
Expand Down

0 comments on commit 4b2c569

Please sign in to comment.