Added duplicate omail and folder features WIP#102
Conversation
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
📝 Coding Plan
Comment |
5820a32 to
a6f2f97
Compare
a6f2f97 to
815cf7a
Compare
815cf7a to
a5c390f
Compare
a5c390f to
ec51999
Compare
| # 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") |
There was a problem hiding this comment.
@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'
No description provided.