Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Register
  • Sign in
  • erp5 erp5
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Merge requests 142
    • Merge requests 142
  • 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
  • nexedinexedi
  • erp5erp5
  • Merge requests
  • !1409

BusinessTemplate: fix removing and trashing a document and its container

  • Review changes

  • Download
  • Patches
  • Plain diff
Merged Jérome Perrin requested to merge fix/bt_trash_upgrader into master May 07, 2021
  • Overview 1
  • Commits 1
  • Pipelines 2
  • Changes 2

Because we were backing up to trash documents in the wrong order (in the example from the test, portal_categories/test_category/removed_container/removed_document first and then portal_categories/test_category/removed_container), first the document was backed-up and some intermediate trash folders were created to keep the hierarchy. Then when backing up the container, there was an error like:

BadRequest: The id "removed_container" is invalid - it is already in use.

Similar error happens when upgrading erp5_configurator_standard, it was failing with:

BadRequest: The id "officejs_sdk_workflow" is invalid - it is already in use.

The fix is to backup in reverse order, to back up first the containers and then the document in containers.

Edited May 07, 2021 by Jérome Perrin
Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: fix/bt_trash_upgrader
GitLab Nexedi Edition | About GitLab | About Nexedi | 沪ICP备2021021310号-2 | 沪ICP备2021021310号-7