From caf9b6fcc24d97586a50b21022fbf673435fe939 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Sureau?= Date: Sat, 28 Jan 2012 12:40:10 +0100 Subject: [PATCH] Correct bug in members model. The has_bills method did not worked as expected. Fix #73. --- budget/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/budget/models.py b/budget/models.py index 3dcd709..5b50e3e 100644 --- a/budget/models.py +++ b/budget/models.py @@ -110,7 +110,7 @@ class Person(db.Model): def has_bills(self): """return if the user do have bills or not""" bills_as_ower_number = db.session.query(billowers)\ - .filter(billowers.columns.get("bill_id") == self.id)\ + .filter(billowers.columns.get("person_id") == self.id)\ .count() return bills_as_ower_number != 0 or len(self.bills) != 0