We should not assume that the caller is going to supply an array
(empty or not) of addresses or cards in the input values for the
open-ils.actor.patron.update method.
Signed-off-by: Dan Scott <dscott@laurentian.ca>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
my $current_id; # id of the address before creation
- for my $address (@{$patron->addresses()}) {
+ my $addresses = $patron->addresses();
+
+ for my $address (@$addresses) {
next unless ref $address;
$current_id = $address->id();
my $evt;
my $virtual_id; #id of the card before creation
- for my $card (@{$patron->cards()}) {
+
+ my $cards = $patron->cards();
+ for my $card (@$cards) {
$card->usr($new_patron->id());