Index: trunk/tools/czartool/Gpc1Db.pm
===================================================================
--- trunk/tools/czartool/Gpc1Db.pm	(revision 31711)
+++ trunk/tools/czartool/Gpc1Db.pm	(revision 31725)
@@ -140,5 +140,5 @@
         JOIN $joinTable USING ($id)
         WHERE label LIKE '$label'
-        AND ($faultCol != 0 AND $stateCol = '$state') OR $stateCol = 'failed_revert'
+        AND (($faultCol != 0 AND $stateCol = '$state') OR $stateCol = 'failed_revert')
 SQL
     $query->execute;
