From ea61ebd4593458dae0ae17cc7d0cc29fd319791a Mon Sep 17 00:00:00 2001 From: "terry%mozilla.org" <> Date: Thu, 14 Oct 1999 03:17:01 +0000 Subject: Removing the last vote on a bug was causing an SQL error. --- doeditvotes.cgi | 1 + 1 file changed, 1 insertion(+) (limited to 'doeditvotes.cgi') diff --git a/doeditvotes.cgi b/doeditvotes.cgi index 2584d583b..ee0bf1ad7 100755 --- a/doeditvotes.cgi +++ b/doeditvotes.cgi @@ -103,6 +103,7 @@ foreach my $id (@buglist) { foreach my $id (keys %affected) { SendSQL("select sum(count) from votes where bug_id = $id"); my $v = FetchOneColumn(); + $v ||= 0; SendSQL("update bugs set votes = $v, delta_ts=delta_ts where bug_id = $id"); } SendSQL("unlock tables"); -- cgit v1.2.3-24-g4f1b