aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorterry%mozilla.org <>1999-10-14 03:17:01 +0000
committerterry%mozilla.org <>1999-10-14 03:17:01 +0000
commitea61ebd4593458dae0ae17cc7d0cc29fd319791a (patch)
tree3fc7ce1dbb4cdbda99071a8829f584ac3e876ca5
parente18c6fd41b16c91ccb6fbca903b0716af37f27c2 (diff)
downloadbugs-ea61ebd4593458dae0ae17cc7d0cc29fd319791a.tar
bugs-ea61ebd4593458dae0ae17cc7d0cc29fd319791a.tar.gz
bugs-ea61ebd4593458dae0ae17cc7d0cc29fd319791a.tar.bz2
bugs-ea61ebd4593458dae0ae17cc7d0cc29fd319791a.tar.xz
bugs-ea61ebd4593458dae0ae17cc7d0cc29fd319791a.zip
Removing the last vote on a bug was causing an SQL error.
-rwxr-xr-xdoeditvotes.cgi1
1 files changed, 1 insertions, 0 deletions
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");