Commit 34b38cac authored by Romain Therville's avatar Romain Therville 🐭
Browse files

Merge branch 'issue#155' into 'master'

#155 convert bool to int to avaoid warning

See merge request !78
parents 84e7b84b 1cc0bfcd
...@@ -202,7 +202,7 @@ class t3MySQLdb(object): ...@@ -202,7 +202,7 @@ class t3MySQLdb(object):
right_level_id = qresult.rows[0][0] right_level_id = qresult.rows[0][0]
sql = "INSERT INTO tx_nG6_project (pid, tstamp, crdate, cruser_id, description, name, hidden, space_id) \ sql = "INSERT INTO tx_nG6_project (pid, tstamp, crdate, cruser_id, description, name, hidden, space_id) \
VALUES ('%s','%s','%s','%s','%s','%s','%s','%s')" % (self.cfg_reader.get_pid(), crdate, crdate, admin_id, VALUES ('%s','%s','%s','%s','%s','%s','%s','%s')" % (self.cfg_reader.get_pid(), crdate, crdate, admin_id,
self.esc_q(pdescription), self.esc_q(name), hidden, space_id) self.esc_q(pdescription), self.esc_q(name), int(hidden), space_id)
qresult = self.execute(sql, commit = True) qresult = self.execute(sql, commit = True)
project_id = qresult.lastrowid project_id = qresult.lastrowid
self.execute("INSERT INTO fe_rights (fe_user_id, project_id, right_id) VALUES ('%s','%s','%s')" % (admin_id, project_id, right_level_id), self.execute("INSERT INTO fe_rights (fe_user_id, project_id, right_id) VALUES ('%s','%s','%s')" % (admin_id, project_id, right_level_id),
...@@ -320,7 +320,7 @@ class t3MySQLdb(object): ...@@ -320,7 +320,7 @@ class t3MySQLdb(object):
'%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s')" % ( self.cfg_reader.get_pid(), crdate, crdate, cruser_id, self.esc_q(name), '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s')" % ( self.cfg_reader.get_pid(), crdate, crdate, cruser_id, self.esc_q(name),
calendar.timegm(date.timetuple()), directory, self.esc_q(species), calendar.timegm(date.timetuple()), directory, self.esc_q(species),
self.esc_q(data_nature), self.esc_q(type), nb_sequences, self.esc_q(data_nature), self.esc_q(type), nb_sequences,
full_seq_size, self.esc_q(description), hidden, self.esc_q(sequencer),retention_date, "stored","0","0","0") full_seq_size, self.esc_q(description), int(hidden), self.esc_q(sequencer),retention_date, "stored","0","0","0")
qresult = self.execute(sql, commit = True) qresult = self.execute(sql, commit = True)
run_id = qresult.lastrowid run_id = qresult.lastrowid
...@@ -471,7 +471,7 @@ class t3MySQLdb(object): ...@@ -471,7 +471,7 @@ class t3MySQLdb(object):
if description: if description:
set_values.append( "description='%s'" % self.esc_q(description)) set_values.append( "description='%s'" % self.esc_q(description))
if hidden: if hidden:
set_values.append( "hidden=%s" % hidden ) set_values.append( "hidden=%s" % int(hidden) )
if sequencer: if sequencer:
set_values.append( "sequencer='%s'" % self.esc_q(sequencer)) set_values.append( "sequencer='%s'" % self.esc_q(sequencer))
if storage_size: if storage_size:
...@@ -673,7 +673,8 @@ class t3MySQLdb(object): ...@@ -673,7 +673,8 @@ class t3MySQLdb(object):
#-------------------------------------------------------------------- #--------------------------------------------------------------------
# Analyze functions # Analyze functions
def add_analysis(self, aclass, name, description, cruser_login, date, directory, software, version, params, is_editable, retention_date, hidden=1, parent_uid=0): def add_analysis(self, aclass, name, description, cruser_login, date, \
directory, software, version, params, is_editable, retention_date, hidden=1, parent_uid=0):
""" """
Update an Analyze Update an Analyze
@param aclass : the class of the analysis @param aclass : the class of the analysis
...@@ -703,7 +704,7 @@ class t3MySQLdb(object): ...@@ -703,7 +704,7 @@ class t3MySQLdb(object):
'%s', '%s', '%s', '%s', '%s', '%s' ,'%s', '%s', '%s', '%s', '%s', '%s', '%s')" % ( self.cfg_reader.get_pid(), crdate, crdate, cruser_id, aclass, '%s', '%s', '%s', '%s', '%s', '%s' ,'%s', '%s', '%s', '%s', '%s', '%s', '%s')" % ( self.cfg_reader.get_pid(), crdate, crdate, cruser_id, aclass,
self.esc_q(name), self.esc_q(description), crdate, self.esc_q(name), self.esc_q(description), crdate,
directory, self.esc_q(software), self.esc_q(version), directory, self.esc_q(software), self.esc_q(version),
hidden, self.esc_q(params), analysis_is_editable, parent_uid, retention_date, "stored","0","0","0") int(hidden), self.esc_q(params), analysis_is_editable, parent_uid, retention_date, "stored","0","0","0")
qresult = self.execute(sql, commit= True) qresult = self.execute(sql, commit= True)
analysis_id = qresult.lastrowid analysis_id = qresult.lastrowid
...@@ -1065,4 +1066,4 @@ class t3MySQLdb(object): ...@@ -1065,4 +1066,4 @@ class t3MySQLdb(object):
qresult = self.execute(sql) qresult = self.execute(sql)
return [ r[0] for r in qresult.rows ] return [ r[0] for r in qresult.rows ]
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment