Skip to content

Added duplicate omail and folder features WIP#102

Draft
chris-adam wants to merge 3 commits intomasterfrom
DMS-888-1088/duplicate
Draft

Added duplicate omail and folder features WIP#102
chris-adam wants to merge 3 commits intomasterfrom
DMS-888-1088/duplicate

Conversation

@chris-adam
Copy link
Copy Markdown
Contributor

No description provided.

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Mar 4, 2026

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: b17227e7-bf2d-41f9-97b9-e108219e469f

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch DMS-888-1088/duplicate
📝 Coding Plan
  • Generate coding plan for human review comments

Comment @coderabbitai help to get the list of available commands and usage tips.

@chris-adam chris-adam force-pushed the DMS-888-1088/duplicate branch 6 times, most recently from 5820a32 to a6f2f97 Compare March 6, 2026 15:48
@chris-adam chris-adam force-pushed the DMS-888-1088/duplicate branch from a6f2f97 to 815cf7a Compare March 12, 2026 14:34
@chris-adam chris-adam force-pushed the DMS-888-1088/duplicate branch from 815cf7a to a5c390f Compare March 12, 2026 15:46
@chris-adam chris-adam force-pushed the DMS-888-1088/duplicate branch from a5c390f to ec51999 Compare March 13, 2026 15:30
# FIXME AttributeError: 'NoneType' object has no attribute 'unregister'
import ipdb; ipdb.set_trace()
for file in [odt_file, pdf_file, gen_file]:
esign_original.approval.approve_file(file, "dirg")
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@sgeulette J'ai ici une erreur que je ne comprends pas. ça fait un moment que je cherche et que je ne comprends pas ce qui se passe

J'ai aussi demandé à claude qui a tourné pendant une heure avant de me sortir le plan que je n'ai pas vraiment compris non plus: approve_file (adapters.py:1654) calls add_mail_files_to_session inside api.env.adopt_roles(["Manager"]). This pushes _proxy_roles=["Manager"] onto the security manager stack. Inside this context, getToolByName(ob, 'portal_uidhandler', None) in Products.CMFUid.UniqueIdAnnotationTool.handleUidAnnotationEvent returns None, crashing at uid_handler.unregister(ob) (no null check in external library). This happens on every createContentInContainer call made inside adopt_roles.

Error in test test_OdmUtilsMethods_copy_dms_files (imio.dms.mail.tests.test_utils.TestUtils)
Traceback (most recent call last):
  File "/home/cadam/.pyenv/versions/2.7.18/lib/python2.7/unittest/case.py", line 329, in run
    testMethod()
  File "/srv/src/server.dmsmail/src/imio.dms.mail/imio/dms/mail/tests/test_utils.py", line 1205, in test_OdmUtilsMethods_copy_dms_files
    for file in [odt_file, pdf_file, gen_file]:
  File "/srv/src/server.dmsmail/src/imio.dms.mail/imio/dms/mail/adapters.py", line 1655, in approve_file
    ret, msg = self.add_mail_files_to_session()
  File "/srv/src/server.dmsmail/src/imio.dms.mail/imio/dms/mail/adapters.py", line 1850, in add_mail_files_to_session
    self._create_pdf_file(fobj, fobj.file, f_title, f_uid, i, session_file_uids)
  File "/srv/src/server.dmsmail/src/imio.dms.mail/imio/dms/mail/adapters.py", line 1772, in _create_pdf_file
    gen_context=gen_context,
  File "/srv/src/server.dmsmail/src/collective.documentgenerator/src/collective/documentgenerator/utils.py", line 348, in convert_and_save_file
    **attributes)
  File "/srv/cache/eggs/plone.dexterity-2.2.8-py2.7-linux-x86_64.egg/plone/dexterity/utils.py", line 199, in createContentInContainer
    checkConstraints=checkConstraints
  File "/srv/cache/eggs/plone.dexterity-2.2.8-py2.7-linux-x86_64.egg/plone/dexterity/utils.py", line 185, in addContentToContainer
    newName = container._setObject(name, object)
  File "/srv/cache/eggs/Products.BTreeFolder2-2.13.3-py2.7-linux-x86_64.egg/Products/BTreeFolder2/BTreeFolder2.py", line 455, in _setObject
    notify(ObjectAddedEvent(ob, self, id))
  File "/srv/cache/eggs/zope.event-3.5.2-py2.7-linux-x86_64.egg/zope/event/__init__.py", line 31, in notify
    subscriber(event)
  File "/srv/cache/eggs/zope.component-3.9.5-py2.7-linux-x86_64.egg/zope/component/event.py", line 24, in dispatch
    zope.component.subscribers(event, None)
  File "/srv/cache/eggs/zope.component-3.9.5-py2.7-linux-x86_64.egg/zope/component/_api.py", line 136, in subscribers
    return sitemanager.subscribers(objects, interface)
  File "/srv/cache/eggs/zope.component-3.9.5-py2.7-linux-x86_64.egg/zope/component/registry.py", line 321, in subscribers
    return self.adapters.subscribers(objects, provided)
  File "/srv/cache/eggs/zope.interface-3.6.7-py2.7-linux-x86_64.egg/zope/interface/adapter.py", line 590, in subscribers
    subscription(*objects)
  File "/srv/cache/eggs/zope.component-3.9.5-py2.7-linux-x86_64.egg/zope/component/event.py", line 32, in objectEventNotify
    zope.component.subscribers((event.object, event), None)
  File "/srv/cache/eggs/zope.component-3.9.5-py2.7-linux-x86_64.egg/zope/component/_api.py", line 136, in subscribers
    return sitemanager.subscribers(objects, interface)
  File "/srv/cache/eggs/zope.component-3.9.5-py2.7-linux-x86_64.egg/zope/component/registry.py", line 321, in subscribers
    return self.adapters.subscribers(objects, provided)
  File "/srv/cache/eggs/zope.interface-3.6.7-py2.7-linux-x86_64.egg/zope/interface/adapter.py", line 590, in subscribers
    subscription(*objects)
  File "/srv/cache/eggs/Products.CMFUid-2.2.2-py2.7-linux-x86_64.egg/Products/CMFUid/UniqueIdAnnotationTool.py", line 86, in handleUidAnnotationEvent
    uid_handler.unregister(ob)
AttributeError: 'NoneType' object has no attribute 'unregister'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant