diff options
-rw-r--r-- | FS/FS/svc_acct.pm | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/FS/FS/svc_acct.pm b/FS/FS/svc_acct.pm index 0be6e5b8d..1d68fc99e 100644 --- a/FS/FS/svc_acct.pm +++ b/FS/FS/svc_acct.pm @@ -505,12 +505,6 @@ sub replace { local $FS::UID::AutoCommit = 0; my $dbh = dbh; - $error = $new->SUPER::replace($old); - if ( $error ) { - $dbh->rollback if $oldAutoCommit; - return $error if $error; - } - $old->usergroup( [ $old->radius_groups ] ); if ( $new->usergroup ) { #(sorta) false laziness with FS::part_export::sqlradius::_export_replace @@ -545,6 +539,12 @@ sub replace { } + $error = $new->SUPER::replace($old); + if ( $error ) { + $dbh->rollback if $oldAutoCommit; + return $error if $error; + } + #false laziness with sub insert (and cust_main) my $queue = new FS::queue { 'svcnum' => $new->svcnum, |