be explicite in parent folder type when checking for uniqueness (#4628)

This commit is contained in:
Frédéric Péters 2014-04-03 16:56:32 +02:00
parent f26cd9615d
commit ad5d77acfd
1 changed files with 1 additions and 1 deletions

View File

@ -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"))