Changeset 177

Show
Ignore:
Timestamp:
12/10/09 08:37:01 (5 years ago)
Author:
tassia
Message:

Fixed bug.

Location:
donkeysurvey
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • donkeysurvey/MessageHandler.py

    r176 r177  
    102102                    session.address.id = addressId 
    103103                    session.file.id = fileId 
    104                     logging.debug("Source %d, File %d: Uploaded(%d), Donwloaded(%d))" % (source_id, file_id, session.uploaded, session.downloaded)) 
     104                    logging.debug("Source %d, File %d: Uploaded(%d), Donwloaded(%d)" % (source_id, file_id, session.uploaded, session.downloaded)) 
    105105                    #logging.debug(session.source.id) 
    106106                    sdao = SessionDAO() 
  • donkeysurvey/database/SessionDAO.py

    r176 r177  
    3434            if s is not None: 
    3535                lastUpdate = datetime.now().strftime("%Y-%m-%d %H:%M:%S") 
    36                 queryUpdate = "UPDATE %s SET last_update = %s, downloaded = %s, uploaded = %s \ 
     36                queryUpdate = "UPDATE %s SET last_update = '%s', downloaded = %s, uploaded = %s \ 
    3737                    WHERE id = %s" % (self.tablename, lastUpdate, session.downloaded, \ 
    3838                    session.uploaded, s.id) 
     39                logging.debug(queryUpdate) 
    3940                self.cursor.execute(queryUpdate) 
    4041                return s.id 
     
    7172            session.file.id = row[6]  
    7273            session.address.id = row[7]  
     74            session.kind = row[8]  
    7375        return session  
    7476 
    7577    def findBySourceFileAddress(self, sourceId, fileId, addressId): 
    7678        query = "SELECT * FROM %s WHERE source_id = %s and file_id = %s and address_id = %s " % (self.tablename, sourceId, fileId, addressId) 
     79        logging.debug(query) 
    7780        self.cursor.execute(query) 
    7881        rs = self.cursor.fetchall() 
     
    8992            session.file.id = row[6]  
    9093            session.address.id = row[7]  
    91  
     94            session.kind = row[8]  
    9295        return session