Skip to content

Commit e9d0aea

Browse files
author
Marshall Jones
committed
reproduce the bug as filed in #103
1 parent fde6c18 commit e9d0aea

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

balanced/resources.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,8 @@ def __getattr__(self, item):
186186
if suffix not in item:
187187
href = getattr(self, item + suffix, None)
188188
if href:
189-
setattr(self, item, Resource.get(href))
189+
item_type = Resource.registry.get(item + 's', Resource)
190+
setattr(self, item, item_type.get(href))
190191
return getattr(self, item)
191192
raise AttributeError(
192193
"'{0}' has no attribute '{1}'".format(

examples/bank_account_debits.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,11 @@ def main():
3939
except balanced.exc.BankAccountVerificationFailure as ex:
4040
print 'Authentication error , %s' % ex.message
4141

42+
# reload
43+
verification = balanced.BankAccount.fetch(
44+
bank_account.href
45+
).bank_account_verification
46+
4247
if verification.confirm(1, 1).verification_status != 'succeeded':
4348
raise Exception('unpossible')
4449
debit = bank_account.debit(100)

0 commit comments

Comments
 (0)