Skip to content

GitLab

  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in / Register
  • erp5 erp5
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Merge requests 147
    • Merge requests 147
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Jobs
  • Commits
Collapse sidebar
  • nexedi
  • erp5erp5
  • Merge requests
  • !2219

Open
Created Jan 02, 2026 by Romain Courteaud@romain🐙Owner
  • Report abuse
Report abuse

Draft: erp5_pdm: reproduce category indexation bug

  • Overview 1
  • Commits 1
  • Changes 3

Using the fallback_category acquisition when a pointed link does not exist can lead to nothing indexed in the category table.

In such case, getAcquiredCategoryList raises a CategoryError, leading to an empty category list in the table, even if the document has other categories.

The attached test fails with:

======================================================================
FAIL: test_notIndexedDocumentBecauseOfBrokenFallbackCategoryAcquisition (erp5.component.test.erp5_version.testIndexationBug.TestIndexationBug)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "<portal_components/test.erp5.testIndexationBug>", line 75, in test_notIndexedDocumentBecauseOfBrokenFallbackCategoryAcquisition
    self._checkDocumentIsIndexed(supply_cell, 1)
  File "<portal_components/test.erp5.testIndexationBug>", line 30, in _checkDocumentIsIndexed
    self.assertTrue(sql_result is not None, 'Category %s is not indexed on %s' % (category_relative_url, document.getRelativeUrl()))
AssertionError: Category resource/product_module/1 is not indexed on sale_supply_module/1/1/1
Edited Jan 02, 2026 by Romain Courteaud
Assignee
Assign to
Reviewer
Request review from
Time tracking
Source branch: fallback_category_indexation_bug
GitLab Nexedi Edition | About GitLab | About Nexedi | 沪ICP备2021021310号-2 | 沪ICP备2021021310号-7