Mercurial > hg > MPIWGWeb
diff MPIWGStaff.py @ 147:6ae0201b1257
bug in edit publications. behoben
author | dwinter |
---|---|
date | Mon, 03 Jun 2013 08:24:14 +0200 |
parents | 45b7b24c8c42 |
children | 0d9eb2a859d3 |
line wrap: on
line diff
--- a/MPIWGStaff.py Fri May 31 21:15:32 2013 +0200 +++ b/MPIWGStaff.py Mon Jun 03 08:24:14 2013 +0200 @@ -821,8 +821,8 @@ data=REQUEST.form - - if data.get("method","change"): + if data.get("method","") == "change": + for key in data.keys(): splitted=key.split("__") #format escidoc_id__p fuer priority, nur escidocid value=data[key] @@ -840,16 +840,16 @@ def deleteFromPublicationList(self,escidocid): """Loessche publication with escidoc id from publication list""" - query ="DELETE FROM pubmanbiblio WHERE escidocid=%s and key_main=%s" + query ="DELETE FROM pubmanbiblio WHERE escidocid=%s and lower(key_main)=%s" - self.executeZSQL(query,[escidocid,self.getKey()]); + self.executeZSQL(query,[escidocid,self.getKey().lower()]); def setPublicationPriority(self,escidocid,value): try: - query="update pubmanbiblio set priority=%s where escidocid=%s and key_main=%s" + query="update pubmanbiblio set priority=%s where escidocid=%s and lower(key_main)=%s" - self.executeZSQL(query,[value,escidocid,self.getKey()]); + self.executeZSQL(query,[value,escidocid,self.getKey().lower()]); except: logging.error("couldn't change:")