From 94759bfdd5d12dd02c4fd850667d936b77cd7d81 Mon Sep 17 00:00:00 2001 From: Mark Wells Date: Tue, 8 Jul 2014 17:02:12 -0700 Subject: [PATCH] fix delete order to avoid foreign key trouble, #13971 --- FS/FS/svc_Radius_Mixin.pm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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; -- 2.11.0