[Zope] Duplicated keys in BTreeFolder2

FLORAC Thierry thierry.florac at onf.fr
Wed Jan 21 05:57:14 EST 2004


  Hi,

I currently use a BTreeFolder2 inherited class, called "users", to store my 
site users profiles.
My problem is that for a few records (~50 for 5700 users), I have duplicated 
keys in my folder, pointing to the same record ; if I remove one of these 
records, the other keys stay into the folder, pointing to nothing !!

My questions now are :

 - how can I avoid these duplicated keys (as long as I only add my users 
profiles via a simple Python script which shouldn't break keys, with :

if not context.users.has_key(username):
  context.users.manage_addProduct['MyProduct'].manage_addUserProfile(username)


 - is it possible to rebuild the folder keys, without breaking the pointed 
records ??


Thanks,

  Thierry

-- 
  Linux every day, keeps Dr Watson away...
  http://gpc.sourceforge.net -- http://www.ulthar.net




More information about the Zope mailing list