diff options
author | René 'Necoro' Neumann <necoro@necoro.net> | 2011-02-15 04:12:02 +0100 |
---|---|---|
committer | René 'Necoro' Neumann <necoro@necoro.net> | 2011-02-15 04:12:02 +0100 |
commit | 428283a2a067f8d0b3a0f7df7190df293b44e3de (patch) | |
tree | e629a0188618a71628831108946e6ac1517ce20c /controller.py | |
parent | 01444a8e45b7bd5b846ebc1a26afb87ee18f8265 (diff) | |
download | kosten-428283a2a067f8d0b3a0f7df7190df293b44e3de.tar.gz kosten-428283a2a067f8d0b3a0f7df7190df293b44e3de.tar.bz2 kosten-428283a2a067f8d0b3a0f7df7190df293b44e3de.zip |
mysql fix
Diffstat (limited to 'controller.py')
-rw-r--r-- | controller.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/controller.py b/controller.py index 21684ee..1ac5132 100644 --- a/controller.py +++ b/controller.py @@ -141,7 +141,12 @@ class Const: d = datetime.date.today() current = ConstExpense.of_month(d.month, d.year) - old = ConstExpense.query.except_(current).order_by(ConstExpense.start) + + csub = current.subquery() + + # if only mysql would allow "EXCEPT" -.- + old = ConstExpense.query.outerjoin((csub, csub.c.id == ConstExpense.id)).filter(csub.c.id == None) + old = old.order_by(ConstExpense.start) return render("constlist", current = current.order_by(ConstExpense.start).all(), old = old.all()) |