--- cdli/cdli_files.py 2009/08/31 14:06:42 1.113 +++ cdli/cdli_files.py 2009/09/01 08:36:04 1.114 @@ -857,8 +857,17 @@ class CDLIRoot(Folder): self.v_files_lastVersion.update({obj.getId():obj.getLastVersion()}) self.v_file_ids.add(obj.getId()) - logging.debug("update:"+obj.getId()+"XXX"+repr(obj)) + #change everthing around to make it persistent... + tmp = self.v_files + self.v_files=tmp + tmp2=self.v_file_ids + self.v_file_ids=tmp2 + + self.CDLICache.cleanCache() #be sure that the cache is clean + logging.debug("update:"+obj.getId()+"XXX"+repr(obj)) + + def deleteFromBTree(self,objId): """delete an obj""" self.v_files.pop(objId) @@ -1373,12 +1382,8 @@ class CDLIRoot(Folder): logging.error("uploadATFfinally - cannot update Object %s Error: %s %s"%(ob[1],sys.exc_info()[0],sys.exc_info()[1])) for x in stObj.returnValue['newPs']: - ob=self.CDLICatalog.search({'title':x}) - try: - self.cdliRoot.updateOrAddToFileBTree(ob[0].getObject()) - except: - - logging.error("uploadATFfinally - cannot update Object %s Error: %s %s"%(x,sys.exc_info()[0],sys.exc_info()[1])) + obj=self.getFileObject(x) #updates the object in the cache + logging.debug("Got:"+repr(obj)) if RESPONSE is not None: RESPONSE.redirect(self.absolute_url())