Uploaded image for project: 'Documentation'
  1. Documentation
  2. DOCS-2417

Comment on: "ecosystem/use-cases/category-hierarchy.txt"

    XMLWordPrintableJSON

Details

    • Icon: Improvement Improvement
    • Resolution: Duplicate
    • Icon: Major - P3 Major - P3
    • 01112017-cleanup
    • None
    • None

    Description

      Code example is incorrect at:

      for cat in db.categories.find(

      {'ancestors._id': bop_id}

      ,

      {'parent_id': 1}

      ):
      build_ancestors_full(cat['_id'], cat['parent_id'])

      Should be:

      for cat in db.categories.find(

      {'ancestors._id': bop_id}

      ,

      {'parent': 1}

      ):
      build_ancestors_full(cat['_id'], cat['parent'])

      parent_id is not used as a document key anywhere else in this code sample.

      Attachments

        Activity

          People

            sam.kleinman Sam Kleinman (Inactive)
            xgen-internal-docs Docs Collector User (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              10 years, 9 weeks, 3 days ago