Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
antgonza committed Jan 2, 2025
1 parent ea0a7ec commit abc554b
Show file tree
Hide file tree
Showing 4 changed files with 286 additions and 152 deletions.
7 changes: 4 additions & 3 deletions qiita_db/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -2114,7 +2114,7 @@ def generate_analysis_list(analysis_ids, public_only=False):
return []

sql = """
SELECT analysis_id, a.name, a.description, a.timestamp,
SELECT analysis_id, a.name, a.description, a.timestamp, a.email,
array_agg(DISTINCT artifact_id),
array_agg(DISTINCT visibility),
array_agg(DISTINCT CASE WHEN filepath_type = 'plain_text'
Expand All @@ -2135,7 +2135,8 @@ def generate_analysis_list(analysis_ids, public_only=False):

qdb.sql_connection.TRN.add(sql, [tuple(analysis_ids)])
for row in qdb.sql_connection.TRN.execute_fetchindex():
aid, name, description, ts, artifacts, av, mapping_files = row
aid, name, description, ts, owner, artifacts, \
av, mapping_files = row

av = 'public' if set(av) == {'public'} else 'private'
if av != 'public' and public_only:
Expand All @@ -2156,7 +2157,7 @@ def generate_analysis_list(analysis_ids, public_only=False):
results.append({
'analysis_id': aid, 'name': name, 'description': description,
'timestamp': ts.strftime("%m/%d/%y %H:%M:%S"),
'visibility': av, 'artifacts': artifacts,
'visibility': av, 'artifacts': artifacts, 'owner': owner,
'mapping_files': mapping_files})

return results
Expand Down
1 change: 1 addition & 0 deletions qiita_pet/handlers/analysis_handlers/base_handlers.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ def analysis_description_handler_get_request(analysis_id, user):
'analysis_is_public': analysis.is_public,
'analysis_description': analysis.description,
'analysis_mapping_id': analysis.mapping_file,
'analysis_owner': analysis.owner.email,
'alert_type': alert_type,
'artifacts': artifacts,
'analysis_reservation': analysis._slurm_reservation()[0],
Expand Down
Loading

0 comments on commit abc554b

Please sign in to comment.