Minor fix to segment cleaning.
[cumulus.git] / lbs.py
diff --git a/lbs.py b/lbs.py
index 4d2641f..5213b89 100644 (file)
--- a/lbs.py
+++ b/lbs.py
@@ -733,5 +733,6 @@ class LocalDatabase:
         cutoffs.reverse()
         for i in range(len(cutoffs)):
             cur.execute("""update block_index set expired = ?
-                           where round(? - timestamp) > ?""",
+                           where round(? - timestamp) > ?
+                             and expired is not null""",
                         (i, now, cutoffs[i]))