From 85fe3f50a034131fb58178d626b842a311d6e13b Mon Sep 17 00:00:00 2001 From: René 'Necoro' Neumann Date: Tue, 15 Feb 2011 04:34:57 +0100 Subject: Do not show consts which already HAVE a next one --- controller.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'controller.py') 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)) ) ) -- cgit v1.2.3-54-g00ecf