+# To keep these things from proliferating, we will follow the same
+# export/noexport switches that radius_attr uses. If you _don't_ use
+# Freeside to maintain your RADIUS group attributes, then it probably
+# shouldn't try to rename groups either.
+
+sub replace {
+ my ($self, $old) = @_;
+ $old ||= $self->replace_old;
+
+ my $error = $self->check;
+ return $error if $error;
+
+ if ( !$FS::radius_attr::noexport_hack ) {
+ foreach ( qsearch('part_export', {}) ) {
+ next if !$_->option('export_attrs',1);
+ $error = $_->export_group_replace($self, $old);
+ return $error if $error;
+ }
+ }
+
+ $self->SUPER::replace($old);
+}