Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generate unique ID for DX types on object creation #2372

Merged
merged 29 commits into from
Sep 3, 2023

Conversation

ramonski
Copy link
Contributor

@ramonski ramonski commented Sep 3, 2023

Description of the issue/feature this PR addresses

This PR is related to #2370 and #2368 to create the right ID during object creation.

This avoids also the time consuming process of moving the whole object when renamed afterwards and should therefore increase the performance.

Current behavior before PR

AT and DX contents are renamed after creation

Desired behavior after PR is merged

A correct ID for AT and DX contents is generated during the creation process.

--
I confirm I have tested this PR thoroughly and coded it according to PEP8
and Plone's Python styleguide standards.

@ramonski ramonski changed the title Generate unique ID on object creation Generate unique ID for DX types on object creation Sep 3, 2023
```
Traceback (innermost last):
  Module ZPublisher.WSGIPublisher, line 176, in transaction_pubevents
  Module ZPublisher.WSGIPublisher, line 385, in publish_module
  Module ZPublisher.WSGIPublisher, line 288, in publish
  Module ZPublisher.mapply, line 85, in mapply
  Module ZPublisher.WSGIPublisher, line 63, in call_object
  Module Products.CMFPlone.controlpanel.browser.quickinstaller, line 666, in __call__
  Module Products.CMFPlone.controlpanel.browser.quickinstaller, line 399, in upgrade_product
  Module Products.GenericSetup.tool, line 1202, in upgradeProfile
  Module Products.GenericSetup.upgrade, line 185, in doStep
  Module senaite.core.upgrade, line 41, in wrap_func_args
  Module zope.event, line 33, in notify
  Module zope.component.event, line 27, in dispatch
  Module zope.component._api, line 134, in subscribers
  Module zope.interface.registry, line 448, in subscribers
  Module zope.interface.adapter, line 899, in subscribers
  Module senaite.storage.subscribers.upgrade, line 33, in afterUpgradeStepHandler
  Module senaite.storage.setuphandlers, line 222, in post_install
  Module senaite.storage.setuphandlers, line 316, in migrate_storage_locations
  Module bika.lims.api, line 859, in search
  Module Products.CMFPlone.CatalogTool, line 440, in searchResults
  Module Products.CMFCore.indexing, line 97, in processQueue
  Module Products.CMFCore.indexing, line 227, in process
  Module senaite.core.patches.catalog, line 110, in portal_catalog_reindex
  Module senaite.core.patches.catalog, line 93, in in_portal_catalog
TypeError: argument of type 'NoneType' is not iterable
```
Copy link
Member

@xispa xispa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Working well. Everything will be simpler after the removal of ATs

@xispa xispa merged commit 003ec3a into 2.x Sep 3, 2023
2 checks passed
@xispa xispa deleted the idserver-generate-id-on-object-creation branch September 3, 2023 19:53
xispa added a commit to senaite/senaite.referral that referenced this pull request Sep 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

2 participants