summaryrefslogtreecommitdiffstats
path: root/todolists/utils.py
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2012-12-31 18:31:35 +0100
committerDan McGee <dan@archlinux.org>2012-12-31 18:31:35 +0100
commit7952fe0ede3a5a68a64f05eccb180194394652f3 (patch)
tree336bd947ab85efa8dbe5758f63393d3533f8f5e6 /todolists/utils.py
parent827b426b4dce6641e77dac975dae180ce6e20b0a (diff)
downloadarchweb-7952fe0ede3a5a68a64f05eccb180194394652f3.tar.gz
archweb-7952fe0ede3a5a68a64f05eccb180194394652f3.tar.xz
Mark todolist packages as removed rather than deleting them
This makes it easier to see the progression of a todolist and its contents easier since we are no longer losing the data. Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'todolists/utils.py')
-rw-r--r--todolists/utils.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/todolists/utils.py b/todolists/utils.py
index 0daca3b..e86d905 100644
--- a/todolists/utils.py
+++ b/todolists/utils.py
@@ -8,6 +8,7 @@ def todo_counts():
sql = """
SELECT todolist_id, count(*), sum(CASE WHEN status = %s THEN 1 ELSE 0 END)
FROM todolists_todolistpackage
+ WHERE removed IS NULL
GROUP BY todolist_id
"""
database = router.db_for_write(TodolistPackage)