Last active
January 16, 2016 14:19
-
-
Save aaronlelevier/7f0eb41b7a40c2065e9b to your computer and use it in GitHub Desktop.
This python function has a bug, can you find it?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def charge(self, account): | |
| """ | |
| Charge account for the monthly amount. This is triggered by | |
| a monthly cron job. | |
| """ | |
| self.check_balance(account) | |
| amount = settings.MONTHLY_CHARGE | |
| return self.create(account=account, amount=amount) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment