Skip to content

Commit 9a406bc

Browse files
committed
Accept sections without titles
Add ignored event RDD_FLOW
1 parent 6bd623b commit 9a406bc

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

pytr/event.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@ def get_event_logger():
102102
"ORDER_EXPIRED",
103103
"ORDER_REJECTED",
104104
"PUK_CREATED",
105+
"RDD_FLOW",
105106
"REFERENCE_ACCOUNT_CHANGED",
106107
"SECURITIES_ACCOUNT_CREATED",
107108
"VERIFICATION_TRANSFER_ACCEPTED",
@@ -233,7 +234,7 @@ def _parse_shares_and_fees(cls, event_dict: Dict[Any, Any]) -> Tuple[Optional[fl
233234
dump_dict = {"eventType": event_dict["eventType"], "id": event_dict["id"]}
234235

235236
sections = event_dict.get("details", {}).get("sections", [{}])
236-
transaction_dicts = filter(lambda x: x["title"] in ["Transaktion"], sections)
237+
transaction_dicts = filter(lambda x: x.get("title") in ["Transaktion"], sections)
237238
for transaction_dict in transaction_dicts:
238239
dump_dict["maintitle"] = transaction_dict["title"]
239240
data = transaction_dict.get("data", [{}])

0 commit comments

Comments
 (0)