{"action":"created","comment":{"url":"https://api.github.com/repos/praekelt/vumi-go/pulls/comments/25595653","id":25595653,"diff_hunk":"@@ -561,6 +561,7 @@ def set_account_balance(account_number, balance):\n     \"\"\"\n     account = Account.objects.get(account_number=account_number)\n     credit_amount = Decimal(str(balance)) - account.credit_balance\n+    credit_amount = max(Decimal('0.0'), credit_amount)","path":"go/billing/tasks.py","position":4,"original_position":4,"commit_id":"88fbb44f086045d3e2aac25e3fc700c51cde4c99","original_commit_id":"88fbb44f086045d3e2aac25e3fc700c51cde4c99","user":{"login":"rudigiesler","id":8234653,"avatar_url":"https://avatars.githubusercontent.com/u/8234653?v=3","gravatar_id":"","url":"https://api.github.com/users/rudigiesler","html_url":"https://github.com/rudigiesler","followers_url":"https://api.github.com/users/rudigiesler/followers","following_url":"https://api.github.com/users/rudigiesler/following{/other_user}","gists_url":"https://api.github.com/users/rudigiesler/gists{/gist_id}","starred_url":"https://api.github.com/users/rudigiesler/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rudigiesler/subscriptions","organizations_url":"https://api.github.com/users/rudigiesler/orgs","repos_url":"https://api.github.com/users/rudigiesler/repos","events_url":"https://api.github.com/users/rudigiesler/events{/privacy}","received_events_url":"https://api.github.com/users/rudigiesler/received_events","type":"User","site_admin":false},"body":"I thought it might be useful to see that the task actually ran, and credited with `0.0`, than not knowing if it was because the account had enough credits, or if the task failed. Happy to change it though.","created_at":"2015-03-02T12:47:17Z","updated_at":"2015-03-02T12:47:17Z","html_url":"https://github.com/praekelt/vumi-go/pull/1213#discussion_r25595653","pull_request_url":"https://api.github.com/repos/praekelt/vumi-go/pulls/1213","_links":{"self":{"href":"https://api.github.com/repos/praekelt/vumi-go/pulls/comments/25595653"},"html":{"href":"https://github.com/praekelt/vumi-go/pull/1213#discussion_r25595653"},"pull_request":{"href":"https://api.github.com/repos/praekelt/vumi-go/pulls/1213"}}},"pull_request":{"url":"https://api.github.com/repos/praekelt/vumi-go/pulls/1213","id":30168416,"html_url":"https://github.com/praekelt/vumi-go/pull/1213","diff_url":"https://github.com/praekelt/vumi-go/pull/1213.diff","patch_url":"https://github.com/praekelt/vumi-go/pull/1213.patch","issue_url":"https://api.github.com/repos/praekelt/vumi-go/issues/1213","number":1213,"state":"open","locked":false,"title":"don't credit developer accounts negatively","user":{"login":"rudigiesler","id":8234653,"avatar_url":"https://avatars.githubusercontent.com/u/8234653?v=3","gravatar_id":"","url":"https://api.github.com/users/rudigiesler","html_url":"https://github.com/rudigiesler","followers_url":"https://api.github.com/users/rudigiesler/followers","following_url":"https://api.github.com/users/rudigiesler/following{/other_user}","gists_url":"https://api.github.com/users/rudigiesler/gists{/gist_id}","starred_url":"https://api.github.com/users/rudigiesler/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rudigiesler/subscriptions","organizations_url":"https://api.github.com/users/rudigiesler/orgs","repos_url":"https://api.github.com/users/rudigiesler/repos","events_url":"https://api.github.com/users/rudigiesler/events{/privacy}","received_events_url":"https://api.github.com/users/rudigiesler/received_events","type":"User","site_admin":false},"body":"Make sure that the `set_developer_account_balances` function does not allow reducing the amount of credits of the account.","created_at":"2015-02-27T14:10:25Z","updated_at":"2015-03-02T12:47:17Z","closed_at":null,"merged_at":null,"merge_commit_sha":"5d31a8ecefd3a65e8d4e555e4d0ccff5cc798f5f","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/praekelt/vumi-go/pulls/1213/commits","review_comments_url":"https://api.github.com/repos/praekelt/vumi-go/pulls/1213/comments","review_comment_url":"https://api.github.com/repos/praekelt/vumi-go/pulls/comments{/number}","comments_url":"https://api.github.com/repos/praekelt/vumi-go/issues/1213/comments","statuses_url":"https://api.github.com/repos/praekelt/vumi-go/statuses/88fbb44f086045d3e2aac25e3fc700c51cde4c99","head":{"label":"praekelt:feature/issue-1213-dont-credit-developer-accounts-negatively","ref":"feature/issue-1213-dont-credit-developer-accounts-negatively","sha":"88fbb44f086045d3e2aac25e3fc700c51cde4c99","user":{"login":"praekelt","id":81810,"avatar_url":"https://avatars.githubusercontent.com/u/81810?v=3","gravatar_id":"","url":"https://api.github.com/users/praekelt","html_url":"https://github.com/praekelt","followers_url":"https://api.github.com/users/praekelt/followers","following_url":"https://api.github.com/users/praekelt/following{/other_user}","gists_url":"https://api.github.com/users/praekelt/gists{/gist_id}","starred_url":"https://api.github.com/users/praekelt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/praekelt/subscriptions","organizations_url":"https://api.github.com/users/praekelt/orgs","repos_url":"https://api.github.com/users/praekelt/repos","events_url":"https://api.github.com/users/praekelt/events{/privacy}","received_events_url":"https://api.github.com/users/praekelt/received_events","type":"Organization","site_admin":false},"repo":{"id":1946622,"name":"vumi-go","full_name":"praekelt/vumi-go","owner":{"login":"praekelt","id":81810,"avatar_url":"https://avatars.githubusercontent.com/u/81810?v=3","gravatar_id":"","url":"https://api.github.com/users/praekelt","html_url":"https://github.com/praekelt","followers_url":"https://api.github.com/users/praekelt/followers","following_url":"https://api.github.com/users/praekelt/following{/other_user}","gists_url":"https://api.github.com/users/praekelt/gists{/gist_id}","starred_url":"https://api.github.com/users/praekelt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/praekelt/subscriptions","organizations_url":"https://api.github.com/users/praekelt/orgs","repos_url":"https://api.github.com/users/praekelt/repos","events_url":"https://api.github.com/users/praekelt/events{/privacy}","received_events_url":"https://api.github.com/users/praekelt/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/praekelt/vumi-go","description":"","fork":false,"url":"https://api.github.com/repos/praekelt/vumi-go","forks_url":"https://api.github.com/repos/praekelt/vumi-go/forks","keys_url":"https://api.github.com/repos/praekelt/vumi-go/keys{/key_id}","collaborators_url":"https://api.github.com/repos/praekelt/vumi-go/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/praekelt/vumi-go/teams","hooks_url":"https://api.github.com/repos/praekelt/vumi-go/hooks","issue_events_url":"https://api.github.com/repos/praekelt/vumi-go/issues/events{/number}","events_url":"https://api.github.com/repos/praekelt/vumi-go/events","assignees_url":"https://api.github.com/repos/praekelt/vumi-go/assignees{/user}","branches_url":"https://api.github.com/repos/praekelt/vumi-go/branches{/branch}","tags_url":"https://api.github.com/repos/praekelt/vumi-go/tags","blobs_url":"https://api.github.com/repos/praekelt/vumi-go/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/praekelt/vumi-go/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/praekelt/vumi-go/git/refs{/sha}","trees_url":"https://api.github.com/repos/praekelt/vumi-go/git/trees{/sha}","statuses_url":"https://api.github.com/repos/praekelt/vumi-go/statuses/{sha}","languages_url":"https://api.github.com/repos/praekelt/vumi-go/languages","stargazers_url":"https://api.github.com/repos/praekelt/vumi-go/stargazers","contributors_url":"https://api.github.com/repos/praekelt/vumi-go/contributors","subscribers_url":"https://api.github.com/repos/praekelt/vumi-go/subscribers","subscription_url":"https://api.github.com/repos/praekelt/vumi-go/subscription","commits_url":"https://api.github.com/repos/praekelt/vumi-go/commits{/sha}","git_commits_url":"https://api.github.com/repos/praekelt/vumi-go/git/commits{/sha}","comments_url":"https://api.github.com/repos/praekelt/vumi-go/comments{/number}","issue_comment_url":"https://api.github.com/repos/praekelt/vumi-go/issues/comments{/number}","contents_url":"https://api.github.com/repos/praekelt/vumi-go/contents/{+path}","compare_url":"https://api.github.com/repos/praekelt/vumi-go/compare/{base}...{head}","merges_url":"https://api.github.com/repos/praekelt/vumi-go/merges","archive_url":"https://api.github.com/repos/praekelt/vumi-go/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/praekelt/vumi-go/downloads","issues_url":"https://api.github.com/repos/praekelt/vumi-go/issues{/number}","pulls_url":"https://api.github.com/repos/praekelt/vumi-go/pulls{/number}","milestones_url":"https://api.github.com/repos/praekelt/vumi-go/milestones{/number}","notifications_url":"https://api.github.com/repos/praekelt/vumi-go/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/praekelt/vumi-go/labels{/name}","releases_url":"https://api.github.com/repos/praekelt/vumi-go/releases{/id}","created_at":"2011-06-24T08:46:21Z","updated_at":"2015-02-27T13:54:15Z","pushed_at":"2015-03-02T12:10:34Z","git_url":"git://github.com/praekelt/vumi-go.git","ssh_url":"git@github.com:praekelt/vumi-go.git","clone_url":"https://github.com/praekelt/vumi-go.git","svn_url":"https://github.com/praekelt/vumi-go","homepage":"","size":42002,"stargazers_count":16,"watchers_count":16,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":14,"mirror_url":null,"open_issues_count":109,"forks":14,"open_issues":109,"watchers":16,"default_branch":"develop"}},"base":{"label":"praekelt:develop","ref":"develop","sha":"14577739f3026d605b39984947d996440b486587","user":{"login":"praekelt","id":81810,"avatar_url":"https://avatars.githubusercontent.com/u/81810?v=3","gravatar_id":"","url":"https://api.github.com/users/praekelt","html_url":"https://github.com/praekelt","followers_url":"https://api.github.com/users/praekelt/followers","following_url":"https://api.github.com/users/praekelt/following{/other_user}","gists_url":"https://api.github.com/users/praekelt/gists{/gist_id}","starred_url":"https://api.github.com/users/praekelt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/praekelt/subscriptions","organizations_url":"https://api.github.com/users/praekelt/orgs","repos_url":"https://api.github.com/users/praekelt/repos","events_url":"https://api.github.com/users/praekelt/events{/privacy}","received_events_url":"https://api.github.com/users/praekelt/received_events","type":"Organization","site_admin":false},"repo":{"id":1946622,"name":"vumi-go","full_name":"praekelt/vumi-go","owner":{"login":"praekelt","id":81810,"avatar_url":"https://avatars.githubusercontent.com/u/81810?v=3","gravatar_id":"","url":"https://api.github.com/users/praekelt","html_url":"https://github.com/praekelt","followers_url":"https://api.github.com/users/praekelt/followers","following_url":"https://api.github.com/users/praekelt/following{/other_user}","gists_url":"https://api.github.com/users/praekelt/gists{/gist_id}","starred_url":"https://api.github.com/users/praekelt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/praekelt/subscriptions","organizations_url":"https://api.github.com/users/praekelt/orgs","repos_url":"https://api.github.com/users/praekelt/repos","events_url":"https://api.github.com/users/praekelt/events{/privacy}","received_events_url":"https://api.github.com/users/praekelt/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/praekelt/vumi-go","description":"","fork":false,"url":"https://api.github.com/repos/praekelt/vumi-go","forks_url":"https://api.github.com/repos/praekelt/vumi-go/forks","keys_url":"https://api.github.com/repos/praekelt/vumi-go/keys{/key_id}","collaborators_url":"https://api.github.com/repos/praekelt/vumi-go/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/praekelt/vumi-go/teams","hooks_url":"https://api.github.com/repos/praekelt/vumi-go/hooks","issue_events_url":"https://api.github.com/repos/praekelt/vumi-go/issues/events{/number}","events_url":"https://api.github.com/repos/praekelt/vumi-go/events","assignees_url":"https://api.github.com/repos/praekelt/vumi-go/assignees{/user}","branches_url":"https://api.github.com/repos/praekelt/vumi-go/branches{/branch}","tags_url":"https://api.github.com/repos/praekelt/vumi-go/tags","blobs_url":"https://api.github.com/repos/praekelt/vumi-go/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/praekelt/vumi-go/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/praekelt/vumi-go/git/refs{/sha}","trees_url":"https://api.github.com/repos/praekelt/vumi-go/git/trees{/sha}","statuses_url":"https://api.github.com/repos/praekelt/vumi-go/statuses/{sha}","languages_url":"https://api.github.com/repos/praekelt/vumi-go/languages","stargazers_url":"https://api.github.com/repos/praekelt/vumi-go/stargazers","contributors_url":"https://api.github.com/repos/praekelt/vumi-go/contributors","subscribers_url":"https://api.github.com/repos/praekelt/vumi-go/subscribers","subscription_url":"https://api.github.com/repos/praekelt/vumi-go/subscription","commits_url":"https://api.github.com/repos/praekelt/vumi-go/commits{/sha}","git_commits_url":"https://api.github.com/repos/praekelt/vumi-go/git/commits{/sha}","comments_url":"https://api.github.com/repos/praekelt/vumi-go/comments{/number}","issue_comment_url":"https://api.github.com/repos/praekelt/vumi-go/issues/comments{/number}","contents_url":"https://api.github.com/repos/praekelt/vumi-go/contents/{+path}","compare_url":"https://api.github.com/repos/praekelt/vumi-go/compare/{base}...{head}","merges_url":"https://api.github.com/repos/praekelt/vumi-go/merges","archive_url":"https://api.github.com/repos/praekelt/vumi-go/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/praekelt/vumi-go/downloads","issues_url":"https://api.github.com/repos/praekelt/vumi-go/issues{/number}","pulls_url":"https://api.github.com/repos/praekelt/vumi-go/pulls{/number}","milestones_url":"https://api.github.com/repos/praekelt/vumi-go/milestones{/number}","notifications_url":"https://api.github.com/repos/praekelt/vumi-go/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/praekelt/vumi-go/labels{/name}","releases_url":"https://api.github.com/repos/praekelt/vumi-go/releases{/id}","created_at":"2011-06-24T08:46:21Z","updated_at":"2015-02-27T13:54:15Z","pushed_at":"2015-03-02T12:10:34Z","git_url":"git://github.com/praekelt/vumi-go.git","ssh_url":"git@github.com:praekelt/vumi-go.git","clone_url":"https://github.com/praekelt/vumi-go.git","svn_url":"https://github.com/praekelt/vumi-go","homepage":"","size":42002,"stargazers_count":16,"watchers_count":16,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":14,"mirror_url":null,"open_issues_count":109,"forks":14,"open_issues":109,"watchers":16,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/praekelt/vumi-go/pulls/1213"},"html":{"href":"https://github.com/praekelt/vumi-go/pull/1213"},"issue":{"href":"https://api.github.com/repos/praekelt/vumi-go/issues/1213"},"comments":{"href":"https://api.github.com/repos/praekelt/vumi-go/issues/1213/comments"},"review_comments":{"href":"https://api.github.com/repos/praekelt/vumi-go/pulls/1213/comments"},"review_comment":{"href":"https://api.github.com/repos/praekelt/vumi-go/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/praekelt/vumi-go/pulls/1213/commits"},"statuses":{"href":"https://api.github.com/repos/praekelt/vumi-go/statuses/88fbb44f086045d3e2aac25e3fc700c51cde4c99"}}}}