aboutsummaryrefslogtreecommitdiff
path: root/budget/web.py
diff options
context:
space:
mode:
authorAlexis Metaireau <alexis@notmyidea.org>2011-08-10 17:49:35 +0200
committerAlexis Metaireau <alexis@notmyidea.org>2011-08-10 17:49:35 +0200
commit822058b251814b3ee209d77b487aec46aaa7d288 (patch)
treeb2f1e4fed7429a4fa42eb064ff8cf0f37c846168 /budget/web.py
parent683c7ee0b87bde0866a1f1e815fe50a6a87ed22e (diff)
downloadihatemoney-mirror-822058b251814b3ee209d77b487aec46aaa7d288.zip
ihatemoney-mirror-822058b251814b3ee209d77b487aec46aaa7d288.tar.gz
ihatemoney-mirror-822058b251814b3ee209d77b487aec46aaa7d288.tar.bz2
Add some more tests about membership. (#14)
Fixes #15 as invalid: deactivated users are not listed on the bill form or on the balance.
Diffstat (limited to 'budget/web.py')
-rw-r--r--budget/web.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/budget/web.py b/budget/web.py
index d529171..9240e9c 100644
--- a/budget/web.py
+++ b/budget/web.py
@@ -150,7 +150,7 @@ def add_member(project):
def remove_member(project, member_id):
person = Person.query.get_or_404(member_id)
if person.project == project:
- if not person.is_used():
+ if not person.has_bills():
db.session.delete(person)
db.session.commit()
flash("User '%s' has been removed" % person.name)