--- MPIWGWeb/Attic/MPIWGRoot.py 2010/06/23 15:01:56 1.1.2.27 +++ MPIWGWeb/Attic/MPIWGRoot.py 2010/07/15 10:20:17 1.1.2.28 @@ -786,10 +786,13 @@ class MPIWGRoot(ZSQLExtendFolder): return result,msg - def updatePersonEntry(self,data,ignoreEntries=[]): + def updatePersonEntry(self,data,ignoreEntries=None): """update an person entry from data. but ignore all fields in ignore Entries""" - + if ignoreEntries is None: + ignoreEntries = [] + ignoreEntries.append('current_work') # TODO:updatecurrent work + logging.debug("updatePersonEntry: data=%s ignoreEntries=%s"%(repr(data),repr(ignoreEntries))) if data['date_to']=="": # wenn date_to leer data['date_to']="date_none" @@ -803,9 +806,9 @@ class MPIWGRoot(ZSQLExtendFolder): columns=data.keys() for x in ignoreEntries: - logging.info("ign rem: %s"%x) + logging.debug("updatePersonEntry: ignoring %s"%x) try: #falls in ignore entries felder sind, die nicht in columns sind, fange den fehler ab - columns.remove(x) + columns.remove(x) except: pass @@ -837,6 +840,8 @@ class MPIWGRoot(ZSQLExtendFolder): resultSet=self.REQUEST.SESSION['personal_www']['resultSet'] news=self.REQUEST.SESSION['personal_www']['news'] conflicts=self.REQUEST.SESSION['personal_www']['conflicts'] + logging.debug("updatePersonalwww_doIt: args=%s\n resultSet=%s\n news=%s\n conflicts=%s"%(args,resultSet,news,conflicts)) + ret="" # generate the new entry @@ -844,8 +849,8 @@ class MPIWGRoot(ZSQLExtendFolder): ret+="

Hinzugefügt

" ret+="

Neueinträge erscheinen erst auf der Homepage, wenn ihnen eine e-mail Adresse zugeordnet wurde.

" ret+="" @@ -871,9 +877,9 @@ class MPIWGRoot(ZSQLExtendFolder): if args[conflict.encode('utf-8')+'_'+cf[0]]=="stored": #use the stored one ignoreEntries.append(cf[0]) #so ignore field cf[0] displayIgnored.append(cf) + if len(displayIgnored)>0: ret+="

%s

"%conflict.encode('utf-8') - ret+="" for iE in displayIgnored: ret+=""%(iE[0].encode('utf-8'),iE[1].encode('utf-8'),iE[2].encode('utf-8'))
%s%s%s