Skip to content

Commit

Permalink
Fix category 1 duplicate problem
Browse files Browse the repository at this point in the history
  • Loading branch information
ajparsons committed Feb 25, 2025
1 parent f0176a2 commit 94f5d02
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pyscraper/regmem/commons/process.py
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,8 @@ def convert_list_to_regmem_hierarchy(
n_interests = []
for i in c.interests:
if i.id in duplicate_ids:
if i.child_items:
# if a duplicate, we want to dump the category 1 rather than 1.1 or 1.2.
if i.child_items and c.number != "1":
n_interests.append(i)
else:
n_interests.append(i)
Expand Down

0 comments on commit 94f5d02

Please sign in to comment.