error out if we get a duplicate create

This commit is contained in:
Darren Ranalli 2005-10-26 23:01:56 +00:00
parent bfe0928939
commit 4d538297ef

View File

@ -233,10 +233,15 @@ class DoCollectionManager:
doTable = self.getDoTable(ownerView)
#assert do.doId not in doTable
# make sure the object is not already present
if do.doId in doTable:
print "ignoring repeated object %s" % (do.doId)
return
if ownerView:
tableName = 'doId2ownerView'
else:
tableName = 'doId2do'
self.notify.error('doId %s already in %s [%s stomping %s]' % (
do.doId, tableName, do.__class__.__name__,
doTable[do.doId].__class__.__name__))
doTable[do.doId]=do