We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1d6b56c commit 3e2f68dCopy full SHA for 3e2f68d
src/ape/managers/accounts.py
@@ -82,13 +82,12 @@ def __getitem__(self, account_id):
82
83
@__getitem__.register
84
def __getitem_int(self, account_id: int):
85
- if account_id in self._accounts_by_index:
86
- return self._accounts_by_index[account_id]
87
-
88
- original_account_id = account_id
89
if account_id < 0:
90
account_id = len(self) + account_id
91
+ if account_id in self._accounts_by_index:
+ return self._accounts_by_index[account_id]
+
92
account = self.containers["test"].get_test_account(account_id)
93
self._accounts_by_index[original_account_id] = account
94
return account
0 commit comments