Skip to content

Commit 0a9247d

Browse files
committed
summary: fix missing schemes when folios are not grouped in CAS
1 parent f46bc7b commit 0a9247d

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

casparser/process/cas_summary.py

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -52,14 +52,15 @@ def process_summary_text(text):
5252
folio = m.group("folio").strip()
5353
if current_folio is None or current_folio != folio:
5454
current_folio = folio
55-
folios[folio] = Folio(
56-
folio=current_folio,
57-
amc=current_amc,
58-
PAN="N/A",
59-
KYC="N/A",
60-
PANKYC="N/A",
61-
schemes=[],
62-
)
55+
if folio not in folios:
56+
folios[folio] = Folio(
57+
folio=current_folio,
58+
amc=current_amc,
59+
PAN="N/A",
60+
KYC="N/A",
61+
PANKYC="N/A",
62+
schemes=[],
63+
)
6364
scheme = m.group("name")
6465
if len(scheme_tails) > 0:
6566
scheme = " ".join([scheme, *scheme_tails])

0 commit comments

Comments
 (0)