diff options
-rwxr-xr-x | FS/t/suite/13-tokenization.t | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/FS/t/suite/13-tokenization.t b/FS/t/suite/13-tokenization.t index 019b61c..a7226e6 100755 --- a/FS/t/suite/13-tokenization.t +++ b/FS/t/suite/13-tokenization.t @@ -30,10 +30,10 @@ ok( !$err, 'schema upgrade' ) or BAIL_OUT('Error string: '.$!); # some pre-upgrade cleanup, upgrade will fail if these are still configured foreach my $cust_main ( $fs->qsearch('cust_main') ) { my @count = $fs->qsearch('agent_payment_gateway', { agentnum => $cust_main->agentnum } ); - if (@count > 1) { + if (@count > 0) { note("DELETING CARDTYPE GATEWAYS"); foreach my $apg (@count) { - $err = $apg->delete if $apg->cardtype; + $err = $apg->delete; last if $err; } @count = $fs->qsearch('agent_payment_gateway', { agentnum => $cust_main->agentnum } ); |