Index: trunk/ippTools/share/stacktool_tosum.sql
===================================================================
--- trunk/ippTools/share/stacktool_tosum.sql	(revision 19434)
+++ trunk/ippTools/share/stacktool_tosum.sql	(revision 19558)
@@ -5,4 +5,5 @@
     stackRun.workdir,
     stackRun.label,
+    stackRun.state,
     rawExp.camera
 FROM stackRun
@@ -26,4 +27,7 @@
     USING(stack_id)
 WHERE
-    stackRun.state = 'new'
-    AND stackSumSkyfile.stack_id IS NULL
+    ((stackRun.state = 'new'
+        AND stackSumSkyfile.stack_id IS NULL)
+    OR
+    (stackRun.state = 'update' 
+        AND stackSumSkyfile.data_state = 'cleaned'))
