• Vincent Pelletier's avatar
    erp5_discussion: Get a clean original_container acquisition chain · 9e3f2c48
    Vincent Pelletier authored
    Otherwise, aq_chain looks like (note the Temporary Discussion Thread):
    [
     <Discussion Post at /erp5/discussion_thread_module/1/2>,
     <Discussion Thread at /erp5/discussion_thread_module/1>,
     <Discussion Thread Module at /erp5/discussion_thread_module used for /erp5/web_site_module/km_test_web_site/forum/Thread-1-GAJgJcpBPJ>,
     <Temporary Discussion Thread at /erp5/web_site_module/km_test_web_site/forum/Thread-1-GAJgJcpBPJ>,
     <Web Section at /erp5/web_site_module/km_test_web_site/forum>,
     <Web Site at /erp5/web_site_module/km_test_web_site>,
     <Web Site Module at /erp5/web_site_module>,
     <ERP5Site at /erp5>,
     <Application at >,
     <ZPublisher.BaseRequest.RequestContainer object at 0x7f478aa18450>
    ]
    which can confuse a "parent" walk.
    Also, reuse existing code, related to asContext which is just what is
    needed here.
    9e3f2c48
DiscussionThread_createNewDiscussionPost.py 2.17 KB