Skip to content

Commit 155a547

Browse files
committed
Fix category 1 duplicate problem
1 parent e56084c commit 155a547

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

pyscraper/regmem/commons/process.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -323,7 +323,8 @@ def convert_list_to_regmem_hierarchy(
323323
n_interests = []
324324
for i in c.interests:
325325
if i.id in duplicate_ids:
326-
if i.child_items:
326+
# if a duplicate, we want to dump the category 1 rather than 1.1 or 1.2.
327+
if i.child_items and c.number != "1":
327328
n_interests.append(i)
328329
else:
329330
n_interests.append(i)

0 commit comments

Comments
 (0)