diff --git a/src/collective/dms/mailcontent/dmsmail.py b/src/collective/dms/mailcontent/dmsmail.py index f4eb304..0a1fd38 100644 --- a/src/collective/dms/mailcontent/dmsmail.py +++ b/src/collective/dms/mailcontent/dmsmail.py @@ -36,7 +36,7 @@ def validateIndexValueUniqueness(context, portal_type, index_name, value): return catalog = getToolByName(context, 'portal_catalog') brains = catalog.searchResults(**{index_name: value}) - if context.portal_type != portal_type: + if context.portal_type in ('Folder', 'pfwbgedfolder'): # we create the dmsincomingmail, the context is the container if brains: raise Invalid(_(u"This value is already used"))