--- cdli/cdli_files.py 2006/08/24 09:08:02 1.43 +++ cdli/cdli_files.py 2006/08/24 09:28:29 1.44 @@ -1309,6 +1309,18 @@ class CDLIFile(versionedFile,CatalogAwar return pt() + def getBasketFromId(self,basketid, context=None): + """get basket from id""" + + if not context: + context=self + + for basket in self.ZopeFind(context,obj_metatypes=["CDLIBasket"]): + if basket[0]==basketid: + return basket[1] + else: + None + def isContainedInBaskets(self,context=None): """check is this file is part of any basket