Skip to content

Commit 0b21971

Browse files
committed
Reset the rank
1 parent 9ce4693 commit 0b21971

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

src/docbuild/cli/cmd_metadata/metaprocess.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -347,6 +347,7 @@ def store_productdocset_json(
347347
docsetxpath = f"./{doctype.docset_xpath_segment(docset)}"
348348
docsetnode = productnode.find(docsetxpath)
349349
descriptions = Description.from_xml_node(productnode)
350+
350351
categories = Category.from_xml_node(productnode)
351352

352353
manifest = Manifest(
@@ -396,6 +397,9 @@ def store_productdocset_json(
396397
"Wrote merged metadata JSON for %s/%s => %s", product, docset, jsonfile
397398
)
398399
stdout.print(f" > Result: {jsonfile}")
400+
# The Category model handles the ranking logic internally,
401+
# so we need to reset the rank before processing a new product.
402+
Category.reset_rank()
399403

400404

401405
async def process(

0 commit comments

Comments
 (0)