Skip to content

Commit 429b770

Browse files
committed
Bug 1877201 - Post to returns wrong
1 parent 6633449 commit 429b770

File tree

1 file changed

+1
-9
lines changed

1 file changed

+1
-9
lines changed

Bugzilla/WebService/Bug.pm

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1233,17 +1233,9 @@ sub add_comment {
12331233
$bug->set_all({comment_tags => $params->{comment_tags}})
12341234
if defined $params->{comment_tags};
12351235

1236-
# Capture the call to bug->update (which creates the new comment) in
1237-
# a transaction so we're sure to get the correct comment_id.
1238-
1239-
my $dbh = Bugzilla->dbh;
1240-
$dbh->bz_start_transaction();
1241-
12421236
$bug->update();
12431237

1244-
my $new_comment_id = $dbh->bz_last_key('longdescs', 'comment_id');
1245-
1246-
$dbh->bz_commit_transaction();
1238+
my $new_comment_id = Bugzilla->dbh->bz_last_key('longdescs', 'comment_id');
12471239

12481240
# Send mail.
12491241
Bugzilla::BugMail::Send($bug->bug_id, {changer => Bugzilla->user});

0 commit comments

Comments
 (0)