From: Mark Wells Date: Wed, 9 Jul 2014 00:02:12 +0000 (-0700) Subject: fix delete order to avoid foreign key trouble, #13971 X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=commitdiff_plain;h=94759bfdd5d12dd02c4fd850667d936b77cd7d81 fix delete order to avoid foreign key trouble, #13971 --- diff --git a/FS/FS/svc_Radius_Mixin.pm b/FS/FS/svc_Radius_Mixin.pm index 969f74952..8e53a1562 100644 --- a/FS/FS/svc_Radius_Mixin.pm +++ b/FS/FS/svc_Radius_Mixin.pm @@ -99,12 +99,12 @@ sub delete { local $FS::UID::AutoCommit = 0; my $dbh = dbh; - my $error = $self->SUPER::delete(@_) - || $self->process_m2m( + my $error = $self->process_m2m( 'link_table' => 'radius_usergroup', 'target_table' => 'radius_group', 'params' => [], - ); + ) + || $self->SUPER::delete; if ( $error ) { $dbh->rollback if $oldAutoCommit;