if view expects one acct peruser, dont give it multiple accounts! [#36797599]
parent
dd7334b54b
commit
7d21e60984
|
@ -955,8 +955,11 @@ class PaymentManager( object ):
|
|||
|
||||
def retrieve_or_make_accounts(self, user, host, token=None, include_deactivated=False):
|
||||
accounts = self.retrieve_accounts(user=user, host=host, include_deactivated=include_deactivated)
|
||||
if len(accounts) > 0:
|
||||
num_acct=len(accounts)
|
||||
if num_acct == 1:
|
||||
return (accounts, False)
|
||||
elif num_acct > 1:
|
||||
return ((accounts[num_acct-1],), False)
|
||||
else:
|
||||
account = self.make_account(user=user, host=host, token=token)
|
||||
return ((account,), True)
|
||||
|
|
Loading…
Reference in New Issue