Alpha Release 0.0.7 #73

Merged
niggl merged 74 commits from dev into main 2021-01-03 17:22:28 +00:00
2 changed files with 6 additions and 1 deletions
Showing only changes of commit 2594a607dc - Show all commits

View File

@ -29,7 +29,7 @@ export class CreateDonor extends CreateParticipant {
newDonor.address = await this.getAddress(); newDonor.address = await this.getAddress();
newDonor.receiptNeeded = this.receiptNeeded; newDonor.receiptNeeded = this.receiptNeeded;
if (this.receiptNeeded == true && this.email == "" && this.address == null) { if (this.receiptNeeded == true && this.address == null) {
throw new DonorReceiptAddressNeededError() throw new DonorReceiptAddressNeededError()
} }

View File

@ -1,4 +1,5 @@
import { IsBoolean, IsInt, IsOptional } from 'class-validator'; import { IsBoolean, IsInt, IsOptional } from 'class-validator';
import { DonorReceiptAddressNeededError } from '../../errors/DonorErrors';
import { Donor } from '../entities/Donor'; import { Donor } from '../entities/Donor';
import { CreateParticipant } from './CreateParticipant'; import { CreateParticipant } from './CreateParticipant';
@ -34,6 +35,10 @@ export class UpdateDonor extends CreateParticipant {
donor.receiptNeeded = this.receiptNeeded; donor.receiptNeeded = this.receiptNeeded;
donor.address = await this.getAddress(); donor.address = await this.getAddress();
if (this.receiptNeeded == true && this.address == null) {
throw new DonorReceiptAddressNeededError()
}
return donor; return donor;
} }
} }