Skip to content
Snippets Groups Projects
Commit 1004b56e authored by Nico Vermaas's avatar Nico Vermaas
Browse files

bugfix: plots didn't show when 1 task missed outputs

parent 0a146890
Branches
No related tags found
No related merge requests found
Pipeline #44178 passed
...@@ -721,7 +721,7 @@ def construct_inspectionplots(task,source='task_id'): ...@@ -721,7 +721,7 @@ def construct_inspectionplots(task,source='task_id'):
tasks = Task.objects.filter(sas_id=sas_id) tasks = Task.objects.filter(sas_id=sas_id)
for task in tasks: for task in tasks:
try:
results += '<tr style="background-color:#7EB1C4"><td colspan="3"><b>Task ' + str(task.id) + '</b></td></tr>' results += '<tr style="background-color:#7EB1C4"><td colspan="3"><b>Task ' + str(task.id) + '</b></td></tr>'
plots = task.quality_json["plots"] plots = task.quality_json["plots"]
...@@ -740,6 +740,9 @@ def construct_inspectionplots(task,source='task_id'): ...@@ -740,6 +740,9 @@ def construct_inspectionplots(task,source='task_id'):
#results += '<tr><td><a href="' + url + '" target="_blank">' + basename + '</a></td><td>'+str(plot['size'])+'</td></tr>' #results += '<tr><td><a href="' + url + '" target="_blank">' + basename + '</a></td><td>'+str(plot['size'])+'</td></tr>'
plot_files.append(plot_file) plot_files.append(plot_file)
except Exception as error:
logger.info('task ' + str(task) + ' has no plots, skipped.')
return results return results
......
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
{% include 'taskdatabase/pagination.html' %} {% include 'taskdatabase/pagination.html' %}
</div> </div>
</div> </div>
<p class="footer"> Version 9 Februari 2023 <p class="footer"> Version 14 Februari 2023
</div> </div>
......
...@@ -418,6 +418,7 @@ class ShowArchivedPage(ListView): ...@@ -418,6 +418,7 @@ class ShowArchivedPage(ListView):
def get_queryset(self): def get_queryset(self):
archived_tasks = Task.objects.filter(status='archived') archived_tasks = Task.objects.filter(status='archived')
#tasks = get_filtered_tasks(self.request, archived_tasks, "sas_id")
tasks = get_filtered_tasks(self.request, archived_tasks) tasks = get_filtered_tasks(self.request, archived_tasks)
paginator = Paginator(tasks, config.TASKS_PER_PAGE) # Show 50 tasks per page paginator = Paginator(tasks, config.TASKS_PER_PAGE) # Show 50 tasks per page
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment