Skip to content

Commit

Permalink
Fix: Anonymous has correct contructor
Browse files Browse the repository at this point in the history
  • Loading branch information
AdrianBalunan committed Mar 5, 2026
1 parent 6c3f7eb commit 2408d90
Showing 1 changed file with 1 addition and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,7 @@ public Donation(double amount, LocalDateTime date, Charity charity, User donor)
this.date = date;
this.charity = charity;
this.donor = donor;

// ASSUMES that this is the way to get the anonymous setting from the user's settings.
if (donor.getSettings().isAnonymous() == false) {
this.isAnonymous = true;
} else {
this.isAnonymous = false;
}
this.isAnonymous = donor.getSettings().isAnonymous();
}

/* Getters for the donation's attributes */
Expand Down

0 comments on commit 2408d90

Please sign in to comment.