mirror of
https://github.com/YunoHost-Apps/ihatemoney_ynh.git
synced 2024-09-03 19:26:15 +02:00
Correct bug in members model. The has_bills method did not worked as expected. Fix #73.
This commit is contained in:
parent
a59465c9a5
commit
caf9b6fcc2
1 changed files with 1 additions and 1 deletions
|
@ -110,7 +110,7 @@ class Person(db.Model):
|
||||||
def has_bills(self):
|
def has_bills(self):
|
||||||
"""return if the user do have bills or not"""
|
"""return if the user do have bills or not"""
|
||||||
bills_as_ower_number = db.session.query(billowers)\
|
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()
|
.count()
|
||||||
return bills_as_ower_number != 0 or len(self.bills) != 0
|
return bills_as_ower_number != 0 or len(self.bills) != 0
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue