File tree 3 files changed +2
-3
lines changed
3 files changed +2
-3
lines changed Original file line number Diff line number Diff line change
1
+ Do not depend on ``plone.api ``. [ale-rt]
Original file line number Diff line number Diff line change 1
1
from .interfaces import IDiscussionSettings
2
2
from .setuphandlers import add_discussion_behavior_to_default_types
3
3
from datetime import timezone
4
- from plone import api
5
4
from plone .registry .interfaces import IRegistry
6
5
from Products .CMFCore .utils import getToolByName
7
6
from Products .ZCatalog .ProgressHandler import ZLogHandler
@@ -92,7 +91,7 @@ def extend_review_workflow(context):
92
91
93
92
def set_timezone_on_dates (context ):
94
93
"""Ensure timezone data is stored against all creation/modified dates"""
95
- pc = api . portal . get_tool ( "portal_catalog" )
94
+ pc = getToolByName ( context , "portal_catalog" )
96
95
creations = 0
97
96
modifieds = 0
98
97
logger .info ("Setting timezone information on comment dates" )
Original file line number Diff line number Diff line change 44
44
"Products.GenericSetup" ,
45
45
"Products.ZCatalog" ,
46
46
"Products.statusmessages" ,
47
- "plone.api" ,
48
47
"plone.app.event" ,
49
48
"plone.registry" ,
50
49
"plone.resource" ,
You can’t perform that action at this time.
0 commit comments