comparison MPIWGStaff.py @ 193:522d32a50c2b

bug with umlauts in editing talks and teachung fixed
author dwinter
date Thu, 20 Jun 2013 10:54:14 +0200
parents 90d44df497a6
children 45984e00665f
comparison
equal deleted inserted replaced
192:dbc397782c76 193:522d32a50c2b
714 query="INSERT INTO %s "%newEntry 714 query="INSERT INTO %s "%newEntry
715 keys=['key_main'] 715 keys=['key_main']
716 values=["'"+sql_quote(self.getKey())+"'"] 716 values=["'"+sql_quote(self.getKey())+"'"]
717 for key in newEntries[newEntry].keys(): 717 for key in newEntries[newEntry].keys():
718 keys.append(key) 718 keys.append(key)
719 values.append("'"+sql_quote(newEntries[newEntry][key])+"'") 719
720 val = sql_quote(newEntries[newEntry][key])
721 if not isinstance(val, unicode):
722 val = val.decode("utf-8")
723
724 values.append("'"+val+"'")
720 725
721 726
722 keystring=",".join(keys) 727 keystring=",".join(keys)
723 728
724 valuestring=",".join(values) 729 valuestring=",".join(values)