diff options
author | ivan <ivan> | 2002-09-08 12:58:00 +0000 |
---|---|---|
committer | ivan <ivan> | 2002-09-08 12:58:00 +0000 |
commit | 49006303c63cc2a6fffb5df5d1d3f8947f700b02 (patch) | |
tree | 555dd3fffaede835f39190123b55cf5be351cb70 /FS/FS/svc_domain.pm | |
parent | 0b62b95185b28bfb2a4eec5639abb2a7d1207ffe (diff) |
ordering fix on delete: domain_record records first, then svc_domain
Diffstat (limited to 'FS/FS/svc_domain.pm')
-rw-r--r-- | FS/FS/svc_domain.pm | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/FS/FS/svc_domain.pm b/FS/FS/svc_domain.pm index b06d030..637d049 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). |