File tree Expand file tree Collapse file tree 1 file changed +10
-5
lines changed Expand file tree Collapse file tree 1 file changed +10
-5
lines changed Original file line number Diff line number Diff line change 9
9
10
10
__version__ = pkg_resources .require ("Products.CMFPlone" )[0 ].version
11
11
12
- if __version__ < '7' :
13
- from Products .CMFCore import explicitacquisition
14
- PTA_ENV_KEY = explicitacquisition .PTA_ENV_KEY
15
- os .environ [PTA_ENV_KEY ] = os .environ .get (PTA_ENV_KEY , 'false' )
16
- explicitacquisition .SKIP_PTA = os .environ .get (PTA_ENV_KEY , "true" ) == "false"
12
+ if __version__ < "7" :
13
+ # This sets SKIP_PTA to skip the check for
14
+ # Publication through acquisition in Plone 6.
15
+ # Please remove this code block when can.
16
+ import Products .CMFCore .explicitacquisition
17
+ from Products .CMFCore .explicitacquisition import PTA_ENV_KEY
18
+
19
+ os .environ [PTA_ENV_KEY ] = os .environ .get (PTA_ENV_KEY , "false" )
20
+ # Importing (from) the module sets SKIP_PTA. We need to override that too.
21
+ Products .CMFCore .explicitacquisition .SKIP_PTA = os .environ [PTA_ENV_KEY ] == "false"
17
22
18
23
cmfplone_globals = globals ()
19
24
this_module = sys .modules [__name__ ]
You can’t perform that action at this time.
0 commit comments