Skip to content
This repository has been archived by the owner on Feb 8, 2018. It is now read-only.

Commit

Permalink
Change update_giving_and_tippees
Browse files Browse the repository at this point in the history
  • Loading branch information
rohitpaulk committed Jul 3, 2015
1 parent 8a6b7c9 commit 236e25c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions gratipay/models/exchange_route.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ def insert(cls, participant, network, address, error='', fee_cap=None):
RETURNING exchange_routes.*::exchange_routes
""", locals())
if network == 'balanced-cc':
participant.update_giving_and_tippees()
participant.update_giving_and_teams()
r.__dict__['participant'] = participant
return r

Expand Down Expand Up @@ -106,4 +106,4 @@ def update_error(self, new_error, propagate=True):
return
if self.participant.is_suspicious or bool(new_error) == bool(old_error):
return
self.participant.update_giving_and_tippees()
self.participant.update_giving_and_teams()
8 changes: 4 additions & 4 deletions gratipay/models/participant.py
Original file line number Diff line number Diff line change
Expand Up @@ -1013,11 +1013,11 @@ def change_username(self, suggested):

return suggested

def update_giving_and_tippees(self):
def update_giving_and_teams(self):
with self.db.get_cursor() as cursor:
updated_tips = self.update_giving(cursor)
for tip in updated_tips:
Participant.from_username(tip.tippee).update_receiving(cursor)
updated_subs = self.update_giving(cursor)
for sub in updated_subs:
Team.from_slug(sub.team).update_receiving(cursor)

def update_giving(self, cursor=None):
updated = []
Expand Down

0 comments on commit 236e25c

Please sign in to comment.