Skip to content

Commit 7870776

Browse files
authored
Merge pull request #31 from jules2689/patch-1
Fix verb assignment for transaction descriptions
2 parents 1a18867 + 19a0cfa commit 7870776

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

ws_api/wealthsimple_api.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -556,9 +556,10 @@ def _activity_add_description(self, act):
556556
act['description'] = f"Money transfer: {direction} Wealthsimple {account_description}"
557557

558558
elif act['type'] in ['DIY_BUY', 'DIY_SELL', 'MANAGED_BUY', 'MANAGED_SELL']:
559-
verb = act['subType'].replace('_', ' ').capitalize()
560559
if 'MANAGED' in act['type']:
561560
verb = "Managed transaction"
561+
else:
562+
verb = act['subType'].replace('_', ' ').capitalize()
562563
action = 'buy' if act['type'] == 'DIY_BUY' or act['type'] == 'MANAGED_BUY' else 'sell'
563564
security = self.security_id_to_symbol(act['securityId'])
564565
if act['assetQuantity'] is None:

0 commit comments

Comments
 (0)