--- MPIWGWeb/MPIWGStaff.py 2005/11/25 12:14:46 1.10.2.20 +++ MPIWGWeb/MPIWGStaff.py 2006/01/16 13:46:21 1.10.2.23 @@ -9,6 +9,7 @@ from Products.PageTemplates.PageTemplate from Products.PageTemplates.PageTemplate import PageTemplate from Products.ZCatalog.CatalogPathAwareness import CatalogAware import os +import zLOG import bibliography from Globals import package_home from Products.PythonScripts.standard import sql_quote @@ -95,10 +96,18 @@ class MPIWGStaff(CatalogAware,ZSQLExtend self.ZSQLQuery("SET DATESTYLE TO 'German'") - self.ZSQLChange(_table="personal_www",_identify="id=%s"%DBid,publish_the_data=publish_the_data, + test=self.ZSQLQuery("select id from personal_www where id='%s' "%DBid) + + + if test and (len(test)>0): #dataset exists + zLOG.LOG("MPIWG Web",zLOG.INFO,'UPDATE: _table="personal_www",_identify="id=%s"'%DBid+',publish_the_data=%s'%publish_the_data+',date_from=%s'%date_from+',date_to=%s'%date_to+',stay_at_mpiwg=%s'%stay_at_mpiwg+',position=%s'%position) + + self.ZSQLChange(_table="personal_www",_identify="id=%s"%DBid,publish_the_data=publish_the_data, date_from=date_from, date_to=date_to,stay_at_mpiwg=stay_at_mpiwg,position=position) - + return True + else: + return False def getPublicationSelectionMode(self): """get publication selection mode, default 'priority'"""