Lines 132-139
if ( $op eq 'delete_confirm' or $countissues > 0 or $debits or $is_guarantor ) {
Link Here
|
132 |
try { |
132 |
try { |
133 |
$patron->delete; |
133 |
$patron->delete; |
134 |
print $input->redirect("/cgi-bin/koha/members/members-home.pl"); |
134 |
print $input->redirect("/cgi-bin/koha/members/members-home.pl"); |
135 |
} catch { |
135 |
} |
136 |
print $input->redirect("/cgi-bin/koha/members/moremember.pl?borrowernumber=$member&error=CANT_DELETE_ANONYMOUS_PATRON"); |
136 |
catch { |
|
|
137 |
if ( $_->isa('Koha::Exceptions::Patron::FailedDeleteAnonymousPatron') ) { |
138 |
print $input->redirect("/cgi-bin/koha/members/moremember.pl?borrowernumber=$member&error=CANT_DELETE_ANONYMOUS_PATRON"); |
139 |
} |
140 |
else { |
141 |
$_->rethrow; |
142 |
} |
137 |
}; |
143 |
}; |
138 |
# TODO Tell the user everything went ok |
144 |
# TODO Tell the user everything went ok |
139 |
exit 0; # Exit without error |
145 |
exit 0; # Exit without error |
140 |
- |
|
|