File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed
src/plone/restapi/services/history Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change 1010from zope .component import queryMultiAdapter
1111from zope .component .hooks import getSite
1212from zope .interface import implementer , alsoProvides
13- from plone .portlets .interfaces import IPortletAssignment
1413from zope .publisher .interfaces import IPublishTraverse
1514
15+ try :
16+ from plone .portlets .interfaces import IPortletAssignment
17+ except ImportError :
18+ IPortletAssignment = None
19+
1620
1721@implementer (IPublishTraverse )
1822class HistoryGet (Service ):
@@ -28,7 +32,10 @@ def reply(self):
2832 # Traverse to historical version
2933 if self .version :
3034 parent = aq_parent (aq_inner (self .context ))
31- if not IPortletAssignment .providedBy (parent ):
35+ if (
36+ IPortletAssignment is not None
37+ and not IPortletAssignment .providedBy (parent )
38+ ):
3239 alsoProvides (parent , IPortletAssignment )
3340 serializer = queryMultiAdapter (
3441 (self .context , self .request ), ISerializeToJson
You can’t perform that action at this time.
0 commit comments