summaryrefslogtreecommitdiff
path: root/controller.py
diff options
context:
space:
mode:
authorRené 'Necoro' Neumann <necoro@necoro.net>2011-02-15 04:34:57 +0100
committerRené 'Necoro' Neumann <necoro@necoro.net>2011-02-15 04:34:57 +0100
commit85fe3f50a034131fb58178d626b842a311d6e13b (patch)
tree73ac2319f0f486d93731455af33ef68408505259 /controller.py
parent2db9eac5e7ba91f42bbbad45a6fb16e5b817e014 (diff)
downloadkosten-85fe3f50a034131fb58178d626b842a311d6e13b.tar.gz
kosten-85fe3f50a034131fb58178d626b842a311d6e13b.tar.bz2
kosten-85fe3f50a034131fb58178d626b842a311d6e13b.zip
Do not show consts which already HAVE a next one
Diffstat (limited to 'controller.py')
-rw-r--r--controller.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/controller.py b/controller.py
index 4314d34..3d0ed1d 100644
--- a/controller.py
+++ b/controller.py
@@ -221,7 +221,8 @@ class ConstAdd:
),
form.Dropdown(
"prev",
- iter.chain([(-1, '')], ConstExpense.query.order_by(CE.description).values(CE.id, CE.description))
+ iter.chain([(-1, '')], ConstExpense.query.filter(ConstExpense.next == None).\
+ order_by(CE.description).values(CE.id, CE.description))
)
)