Fix update SDN net on scale
[osm/RO.git] / RO / osm_ro / db_base.py
index 9c13133..1db72e9 100644 (file)
@@ -525,8 +525,8 @@ class db_base():
         # gettting uuid
         values = ",".join(map(self.__tuple2db_format_set, UPDATE.items() ))
         if modified_time:
         # gettting uuid
         values = ",".join(map(self.__tuple2db_format_set, UPDATE.items() ))
         if modified_time:
-            values += ",modified_at={:f}".format(modified_time)
-        cmd= "UPDATE " + table + " SET " + values + " WHERE " + self.__create_where(WHERE)
+            values += "{}modified_at={:f}".format("," if values else "", modified_time)
+        cmd = "UPDATE " + table + " SET " + values + " WHERE " + self.__create_where(WHERE)
         self.logger.debug(cmd)
         self.cur.execute(cmd)
         return self.cur.rowcount
         self.logger.debug(cmd)
         self.cur.execute(cmd)
         return self.cur.rowcount