--- ZSQLExtend/ZSQLMetaData.py 2004/02/05 20:31:42 1.1 +++ ZSQLExtend/ZSQLMetaData.py 2012/09/03 13:06:11 1.4 @@ -33,8 +33,11 @@ class ZSQLMetadataMapping(SimpleItem): def getValue(self,fieldName): """get md value""" - return getattr(self,"md_"+fieldName) - + try: + return getattr(self,"md_"+fieldName) + except: + return "" + def generateMappingHash(self): """erzeugen des Hash""" hash={} @@ -63,12 +66,12 @@ class ZSQLMetadataMapping(SimpleItem): def manage_addZSQLMetadataMappingForm(self): - """interface for adding the OSAS_root""" + """interface for adding the Metadatamapping""" pt=PageTemplateFile('Products/ZSQLExtend/AddZSQLMetadataMapping.zpt').__of__(self) return pt() def manage_addZSQLMetadataMapping(self,idOfObject,titleOfObject,RESPONSE=None): - """add the OSAS_root""" + """add the Metadatampapping""" argList={} for arg in self.REQUEST.form.keys(): @@ -82,7 +85,7 @@ def manage_addZSQLMetadataMapping(self,i class ZSQLMetadataMappingRoot(Persistent, Implicit, Folder): - """Root ordner für Metadaten set""" + """Root ordner fuer Metadaten set""" meta_type='ZSQLMetadataMappingRoot' @@ -142,7 +145,7 @@ class ZSQLMetadataMappingRoot(Persistent return id def getStoredTypes(self): - """Gebe gespeicherte typen zurück""" + """Gebe gespeicherte typen zurueck""" types=[] for dict in self.__dict__: @@ -180,7 +183,7 @@ def manage_addZSQLMetadataMappingRootFor return pt() def manage_addZSQLMetadataMappingRoot(self,id,title,fields,RESPONSE=None): - """add the OSAS_root""" + """add the mapping root""" newObj=ZSQLMetadataMappingRoot(id,title,fields) self._setObject(id,newObj) if RESPONSE is not None: