Fix bug where it prints out every single entry when criterion wrong
This commit is contained in:
parent
022a41c131
commit
c2b01e6d97
1 changed files with 2 additions and 5 deletions
|
@ -28,11 +28,8 @@ my $sp = new Supporters($dbh, ['none']);
|
||||||
|
|
||||||
my $found = 0;
|
my $found = 0;
|
||||||
my(@supporterIds);
|
my(@supporterIds);
|
||||||
if ($CRITERION ne 'id') {
|
die "Can only search on id, ledgerEntityId, emailAddress" unless $CRITERION =~ /^(ledgerEntityId|emailAddress|id)$/;
|
||||||
@supporterIds = $sp->findDonor({$CRITERION => $SEARCH_PARAMETER });
|
@supporterIds = $sp->findDonor({$CRITERION => $SEARCH_PARAMETER });
|
||||||
} else {
|
|
||||||
push(@supporterIds, $SEARCH_PARAMETER);
|
|
||||||
}
|
|
||||||
my @requestTypes = $sp->getRequestType();
|
my @requestTypes = $sp->getRequestType();
|
||||||
foreach my $id (@supporterIds) {
|
foreach my $id (@supporterIds) {
|
||||||
$found = 1;
|
$found = 1;
|
||||||
|
|
Loading…
Reference in a new issue