be explicite in parent folder type when checking for uniqueness (#4628)
This commit is contained in:
parent
f26cd9615d
commit
ad5d77acfd
|
@ -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"))
|
||||
|
|
Reference in New Issue