diff options
| author | Alexis Metaireau <alexis@notmyidea.org> | 2017-03-18 23:54:28 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-03-18 23:54:28 +0100 |
| commit | 79d33e1c65142dcf96c5e41ea3ff572122727bb7 (patch) | |
| tree | b2f768af8a221c02864b31ee977492970513d34b /budget/models.py | |
| parent | 42854bd064404931eaccc3580ce505611162108b (diff) | |
| parent | 2f2388b5b4f7b1b5e1d6db440241048410fcdf3b (diff) | |
| download | ihatemoney-mirror-79d33e1c65142dcf96c5e41ea3ff572122727bb7.zip ihatemoney-mirror-79d33e1c65142dcf96c5e41ea3ff572122727bb7.tar.gz ihatemoney-mirror-79d33e1c65142dcf96c5e41ea3ff572122727bb7.tar.bz2 | |
Merge pull request #178 from 0livd/py3
Py2/3 compatibility, 2nd round
Diffstat (limited to 'budget/models.py')
| -rw-r--r-- | budget/models.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/budget/models.py b/budget/models.py index 8f570fb..1da4489 100644 --- a/budget/models.py +++ b/budget/models.py @@ -255,11 +255,11 @@ class Bill(db.Model): def pay_each(self): """Compute what each share has to pay""" - if self.owers: - # FIXME: SQL might dot that more efficiently - return self.amount / sum(i.weight for i in self.owers) - else: - return 0 + if self.owers: + # FIXME: SQL might dot that more efficiently + return self.amount / sum(i.weight for i in self.owers) + else: + return 0 def __repr__(self): return "<Bill of %s from %s for %s>" % (self.amount, |
