Index: branches/pap/ippTools/share/magictool_definebyquery.sql
===================================================================
--- branches/pap/ippTools/share/magictool_definebyquery.sql	(revision 23511)
+++ branches/pap/ippTools/share/magictool_definebyquery.sql	(revision 23677)
@@ -45,7 +45,8 @@
 WHERE
     diffSkyfile.fault = 0
+    AND diffSkyfile.quality = 0
 -- WHERE hook %s
-AND exp_id = 36475
-AND diffRun.label = 'magic_2008-11-12'
+    AND exp_id = 36475
+    AND diffRun.label = 'magic_2008-11-12'
 GROUP BY
     exp_id,
@@ -79,5 +80,5 @@
     JOIN diffRun USING(diff_id)
     WHERE
-        warpSkyfile.ignored = 0
+        warpSkyfile.quality = 0
         -- magicSkycellNums WHERE hook %s
 AND exp_id = 36475
