Skip to content

Commit 39f7961

Browse files
committed
Merge branch 'fix-947' of https://github.com/antgonza/qiita into delete-analysis
2 parents dff6c49 + d57bd97 commit 39f7961

File tree

2 files changed

+7
-9
lines changed

2 files changed

+7
-9
lines changed

qiita_pet/handlers/analysis_handlers.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -143,18 +143,16 @@ def get(self, analysis_id):
143143
jobject.results))
144144

145145
dropped_samples = analysis.dropped_samples
146-
dropped = {}
146+
dropped = defaultdict(list)
147147
if dropped_samples:
148148
for proc_data_id, samples in viewitems(analysis.dropped_samples):
149149
if not samples:
150150
continue
151151
proc_data = ProcessedData(proc_data_id)
152152
data_type = proc_data.data_type()
153153
study = proc_data.study
154-
if data_type not in dropped:
155-
dropped[data_type] = []
156-
dropped[data_type].append({'study': Study(study).title,
157-
'samples': samples})
154+
dropped[data_type].append((Study(study).title, len(samples),
155+
', '.join(samples)))
158156

159157
self.render("analysis_results.html", analysis_id=analysis_id,
160158
jobres=jobres, aname=analysis.name, dropped=dropped,

qiita_pet/templates/analysis_results.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,12 +37,12 @@ <h3 class="panel-title"><a data-toggle="collapse" data-parent="#accordion" href=
3737
{% for data_type, studies in viewitems(dropped) %}
3838
<b><u>{{data_type}}</u></b>
3939
<br/><br/>
40-
{% for s in studies %}
41-
<b>{{s['study']}}:</b>
40+
{% for title, num_samples, samples in studies %}
41+
<b>{{title}}:</b>
4242
<br/>
43-
Total dropped: {{len(s['samples'])}}
43+
Total dropped: {{num_samples}}
4444
<br/>
45-
{{', '.join(s['samples'])}}<br/>
45+
{{samples}}<br/>
4646
{% end %}
4747
<hr>
4848
{% end %}

0 commit comments

Comments
 (0)