Edgewall Software

Ticket #6776: pg_str_cast.patch

File pg_str_cast.patch, 1.2 KB (added by jhampton, 4 years ago)

Patch for correcting implicit string casts.

  • model.py

     
    297297                           "SELECT time,author,'comment',null,description,0 " 
    298298                           "FROM attachment WHERE id=%s AND time=%s " 
    299299                           "ORDER BY time", 
    300                            (self.id, when_ts, str(self.id), when_ts, self.id, when_ts)) 
     300                           (self.id, when_ts, str(self.id), when_ts, str(self.id), when_ts)) 
    301301        else: 
    302302            cursor.execute("SELECT time,author,field,oldvalue,newvalue,1 " 
    303303                           "FROM ticket_change WHERE ticket=%s " 
     
    307307                           "UNION " 
    308308                           "SELECT time,author,'comment',null,description,0 " 
    309309                           "FROM attachment WHERE id=%s " 
    310                            "ORDER BY time", (self.id,  str(self.id), self.id)) 
     310                           "ORDER BY time", (self.id,  str(self.id), str(self.id))) 
    311311        log = [] 
    312312        for t, author, field, oldvalue, newvalue, permanent in cursor: 
    313313            log.append((datetime.fromtimestamp(int(t), utc), author, field,