From: ivan Date: Sun, 8 Sep 2002 12:58:00 +0000 (+0000) Subject: ordering fix on delete: domain_record records first, then svc_domain X-Git-Tag: freeside_1_5_0pre1~257 X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=commitdiff_plain;h=49006303c63cc2a6fffb5df5d1d3f8947f700b02 ordering fix on delete: domain_record records first, then svc_domain --- diff --git a/FS/FS/svc_domain.pm b/FS/FS/svc_domain.pm index b06d03013..637d0493c 100644 --- a/FS/FS/svc_domain.pm +++ b/FS/FS/svc_domain.pm @@ -269,12 +269,6 @@ sub delete { local $FS::UID::AutoCommit = 0; my $dbh = dbh; - my $error = $self->SUPER::delete; - if ( $error ) { - $dbh->rollback if $oldAutoCommit; - return $error; - } - foreach my $domain_record ( reverse $self->domain_record ) { my $error = $domain_record->delete; if ( $error ) { @@ -282,6 +276,13 @@ sub delete { return $error; } } + + my $error = $self->SUPER::delete; + if ( $error ) { + $dbh->rollback if $oldAutoCommit; + return $error; + } + $dbh->commit or die $dbh->errstr if $oldAutoCommit; } @@ -448,10 +449,6 @@ sub submit_internic { =back -=head1 VERSION - -$Id: svc_domain.pm,v 1.31 2002-06-10 02:52:48 ivan Exp $ - =head1 BUGS All BIND/DNS fields should be included (and exported).