summaryrefslogtreecommitdiff
path: root/FS/FS/part_export/sqlradius.pm
diff options
context:
space:
mode:
authorMark Wells <mark@freeside.biz>2012-03-17 15:01:19 -0700
committerMark Wells <mark@freeside.biz>2012-03-17 15:01:19 -0700
commit68cd93a81814d8725118a66b54f20e2c2c1c20f0 (patch)
tree22be0c506a1b66848a740e8b368f0c40f920daaa /FS/FS/part_export/sqlradius.pm
parent4745efea9b2308b1fba8a8180a1a0b5da2986794 (diff)
freeside-upgrade fixes related to #14698 and #15017
Diffstat (limited to 'FS/FS/part_export/sqlradius.pm')
-rw-r--r--FS/FS/part_export/sqlradius.pm15
1 files changed, 12 insertions, 3 deletions
diff --git a/FS/FS/part_export/sqlradius.pm b/FS/FS/part_export/sqlradius.pm
index 752bf12a2..910346bea 100644
--- a/FS/FS/part_export/sqlradius.pm
+++ b/FS/FS/part_export/sqlradius.pm
@@ -1185,7 +1185,10 @@ SELECT groupname, attribute, op, value, \'R\' FROM radgroupreply';
'priority' => 1,
};
$error = $radius_group->insert;
- return "error inserting group $groupname: $error" if $error;
+ if ( $error ) {
+ warn "error inserting group $groupname: $error";
+ next;#don't continue trying to insert the attribute
+ }
$attrs_of{$groupname} = {};
$groupnum_of{$groupname} = $radius_group->groupnum;
}
@@ -1202,7 +1205,10 @@ SELECT groupname, attribute, op, value, \'R\' FROM radgroupreply';
'value' => $value,
};
$error = $new->replace($old);
- return "error modifying attr $attrname: $error" if $error;
+ if ( $error ) {
+ warn "error modifying attr $attrname: $error";
+ next;
+ }
}
else {
$new = new FS::radius_attr {
@@ -1213,7 +1219,10 @@ SELECT groupname, attribute, op, value, \'R\' FROM radgroupreply';
'value' => $value,
};
$error = $new->insert;
- return "error inserting attr $attrname: $error" if $error;
+ if ( $error ) {
+ warn "error inserting attr $attrname: $error" if $error;
+ next;
+ }
}
$attrs_of{$groupname}->{$attrname} = $new;
} #foreach $row