Skip to content

Commit ddf2ff4

Browse files
committed
more comments addressed
1 parent 874632b commit ddf2ff4

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

qiita_db/data.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1322,14 +1322,13 @@ def processing_info(self):
13221322
# Get the info from the dynamic table, including reference used
13231323
sql = """SELECT * from qiita.{0}
13241324
JOIN qiita.reference USING (reference_id)
1325-
WHERE processed_params_id = {1} AND reference_id = (
1326-
SELECT reference_id FROM qiita.{0} WHERE processed_params_id = {1})
1325+
WHERE processed_params_id = {1}
13271326
""".format(static_info['processed_params_table'],
13281327
static_info['processed_params_id'])
13291328
dynamic_info = dict(conn_handler.execute_fetchone(sql))
13301329

13311330
# replace reference filepath_ids with full filepaths
1332-
# fiugre out what columns have filepaths and what don't
1331+
# figure out what columns have filepaths and what don't
13331332
ref_fp_cols = {'sequence_filepath', 'taxonomy_filepath',
13341333
'tree_filepath'}
13351334
fp_ids = [str(dynamic_info[col]) for col in ref_fp_cols

qiita_db/user.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -228,8 +228,8 @@ def create(cls, email, password, info=None):
228228
queue = "add_user_%s" % email
229229
conn_handler.create_queue(queue)
230230
# crete user
231-
sql = ("INSERT INTO qiita.%s (%s) VALUES (%s)" %
232-
(cls._table, ','.join(columns), ','.join(['%s'] * len(values))))
231+
sql = "INSERT INTO qiita.{0} ({1}) VALUES ({2})".format(
232+
cls._table, ','.join(columns), ','.join(['%s'] * len(values)))
233233
conn_handler.add_to_queue(queue, sql, values)
234234
# create user default sample holder
235235
sql = ("INSERT INTO qiita.analysis "
@@ -379,7 +379,7 @@ def shared_studies(self):
379379
@property
380380
def private_analyses(self):
381381
"""Returns a list of private analysis ids owned by the user"""
382-
sql = ("Select analysis_id from qiita.analysis "
382+
sql = ("SELECT analysis_id FROM qiita.analysis "
383383
"WHERE email = %s AND dflt = false")
384384
conn_handler = SQLConnectionHandler()
385385
analysis_ids = conn_handler.execute_fetchall(sql, (self._id, ))

0 commit comments

Comments
 (0)