File tree Expand file tree Collapse file tree
src/collective/exportimport Expand file tree Collapse file tree Original file line number Diff line number Diff line change 99from collective .exportimport .interfaces import IRawRichTextMarker
1010from operator import itemgetter
1111from plone import api
12- from plone .app .contenttypes .interfaces import ICollection
1312from plone .app .layout .viewlets .content import ContentHistoryViewlet
1413from plone .i18n .normalizer .interfaces import IIDNormalizer
1514from plone .restapi .interfaces import ISerializeToJson
5958
6059 HAS_DX = True
6160
61+ try :
62+ pkg_resources .get_distribution ("plone.app.contenttypes" )
63+ except pkg_resources .DistributionNotFound :
64+ ICollection = None
65+ HAS_PAC = False
66+ else :
67+ from plone .app .contenttypes .interfaces import ICollection
68+
69+ HAS_PAC = True
70+
6271try :
6372 pkg_resources .get_distribution ("z3c.relationfield" )
6473except pkg_resources .DistributionNotFound :
@@ -387,7 +396,7 @@ def export_content(self):
387396 item = serializer ()
388397 elif getattr (aq_base (obj ), "isPrincipiaFolderish" , False ):
389398 item = serializer (include_items = False )
390- elif ICollection .providedBy (obj ):
399+ elif HAS_PAC and ICollection .providedBy (obj ):
391400 item = serializer (include_items = False )
392401 else :
393402 item = serializer ()
You can’t perform that action at this time.
0 commit comments