[Erp5-dev] proposed patch for Person

Pelletier Vincent vincent at nexedi.com
Mon Mar 5 09:47:41 CET 2007


Le Samedi 3 Mars 2007 15:38, Jérôme Perrin a écrit :
> [1] Anybody knows why it have to immediate reindex object ?
> (MultiRelationField.py line 412)

That code is very suspicious to me, because basically we:
-create an object and index it immediately
-get its UID
-get the object from catalog using this uid

Even if I guess there might be cases where we want an object to be indexed at 
creation, I guess we _never_ want to waste so much time in 
storing-then-fetching the same object in catalog.

Line 680 (and below) there is a similar case :
-get the uids of all objects in a list
-iterate in the uid list:
  -fetch object from catalog

I tried a patch on this code and commited, but my patch was bad and the commit 
was reverted. I haven't give it another try, though I think it deserves it.

-- 
Vincent Pelletier



More information about the Erp5-dev mailing list